diff --git a/android/assets/1280x720/Shooter1.png b/android/assets/1280x720/Shooter1.png new file mode 100755 index 0000000..12e54e3 Binary files /dev/null and b/android/assets/1280x720/Shooter1.png differ diff --git a/android/assets/1280x720/shard.png b/android/assets/1280x720/shard.png index 381e67d..d1574ea 100755 Binary files a/android/assets/1280x720/shard.png and b/android/assets/1280x720/shard.png differ diff --git a/android/assets/1280x720/star_bg.png b/android/assets/1280x720/star_bg.png index 81e2cbd..943a44d 100755 Binary files a/android/assets/1280x720/star_bg.png and b/android/assets/1280x720/star_bg.png differ diff --git a/android/assets/1280x800/Shooter1.png b/android/assets/1280x800/Shooter1.png new file mode 100755 index 0000000..75878cb Binary files /dev/null and b/android/assets/1280x800/Shooter1.png differ diff --git a/android/assets/1280x800/shard.png b/android/assets/1280x800/shard.png index d77b6db..a29a60d 100755 Binary files a/android/assets/1280x800/shard.png and b/android/assets/1280x800/shard.png differ diff --git a/android/assets/1280x800/star_bg.png b/android/assets/1280x800/star_bg.png index c860e9c..6d11812 100755 Binary files a/android/assets/1280x800/star_bg.png and b/android/assets/1280x800/star_bg.png differ diff --git a/android/assets/1366x768/Shooter1.png b/android/assets/1366x768/Shooter1.png new file mode 100755 index 0000000..6632c4a Binary files /dev/null and b/android/assets/1366x768/Shooter1.png differ diff --git a/android/assets/1366x768/shard.png b/android/assets/1366x768/shard.png index 5e9c4fb..97083d9 100755 Binary files a/android/assets/1366x768/shard.png and b/android/assets/1366x768/shard.png differ diff --git a/android/assets/1366x768/star_bg.png b/android/assets/1366x768/star_bg.png index 189f4b9..ed60091 100755 Binary files a/android/assets/1366x768/star_bg.png and b/android/assets/1366x768/star_bg.png differ diff --git a/android/assets/1920x1080/Shooter1.png b/android/assets/1920x1080/Shooter1.png new file mode 100755 index 0000000..59254c1 Binary files /dev/null and b/android/assets/1920x1080/Shooter1.png differ diff --git a/android/assets/1920x1080/shard.png b/android/assets/1920x1080/shard.png index 3b3c0b6..154e2b2 100755 Binary files a/android/assets/1920x1080/shard.png and b/android/assets/1920x1080/shard.png differ diff --git a/android/assets/1920x1080/star_bg.png b/android/assets/1920x1080/star_bg.png index 58f87ae..ed267c8 100755 Binary files a/android/assets/1920x1080/star_bg.png and b/android/assets/1920x1080/star_bg.png differ diff --git a/android/assets/1920x1200/Shooter1.png b/android/assets/1920x1200/Shooter1.png new file mode 100755 index 0000000..9ccb7dc Binary files /dev/null and b/android/assets/1920x1200/Shooter1.png differ diff --git a/android/assets/1920x1200/shard.png b/android/assets/1920x1200/shard.png index 2b6bf7a..f952746 100755 Binary files a/android/assets/1920x1200/shard.png and b/android/assets/1920x1200/shard.png differ diff --git a/android/assets/1920x1200/star_bg.png b/android/assets/1920x1200/star_bg.png index a8d3df2..82aee1b 100755 Binary files a/android/assets/1920x1200/star_bg.png and b/android/assets/1920x1200/star_bg.png differ diff --git a/android/assets/2560x1440/Shooter1.png b/android/assets/2560x1440/Shooter1.png new file mode 100755 index 0000000..5c89fe0 Binary files /dev/null and b/android/assets/2560x1440/Shooter1.png differ diff --git a/android/assets/2560x1440/shard.png b/android/assets/2560x1440/shard.png index da7b114..10a036f 100755 Binary files a/android/assets/2560x1440/shard.png and b/android/assets/2560x1440/shard.png differ diff --git a/android/assets/2560x1440/star_bg.png b/android/assets/2560x1440/star_bg.png index 36ca2db..f56a342 100755 Binary files a/android/assets/2560x1440/star_bg.png and b/android/assets/2560x1440/star_bg.png differ diff --git a/android/assets/3840x2160/laser.png b/android/assets/3840x2160/laser.png index a37bde1..f5d289f 100755 Binary files a/android/assets/3840x2160/laser.png and b/android/assets/3840x2160/laser.png differ diff --git a/android/assets/3840x2160/shard.png b/android/assets/3840x2160/shard.png index 8fa8673..637a04d 100755 Binary files a/android/assets/3840x2160/shard.png and b/android/assets/3840x2160/shard.png differ diff --git a/android/assets/800x480/Shooter1.png b/android/assets/800x480/Shooter1.png new file mode 100755 index 0000000..8f36adc Binary files /dev/null and b/android/assets/800x480/Shooter1.png differ diff --git a/android/assets/800x480/shard.png b/android/assets/800x480/shard.png index bebeb82..4f7787e 100755 Binary files a/android/assets/800x480/shard.png and b/android/assets/800x480/shard.png differ diff --git a/android/assets/800x480/star_bg.png b/android/assets/800x480/star_bg.png index 530d71c..feb856e 100755 Binary files a/android/assets/800x480/star_bg.png and b/android/assets/800x480/star_bg.png differ diff --git a/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java b/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java index 2ca4651..56d0d75 100755 --- a/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java +++ b/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java @@ -68,10 +68,10 @@ public class GamePlayMap { * @return the object. */ public EntitySpawnInfo nextEntitySpawnInfo(EntityIndex entityType) { + EntitySpawnInfo esi = new EntitySpawnInfo(entityType); if (spawnList.get(index) == null) { spawnList.set(index, new MapWindowData()); } - EntitySpawnInfo esi = new EntitySpawnInfo(entityType); spawnList.get(index).addEntity(esi); return esi; } @@ -81,7 +81,8 @@ public class GamePlayMap { */ public void nextWindow() { if (building) { - index++; + spawnList.add(new MapWindowData()); + resetIndex(); } } @@ -117,7 +118,7 @@ public class GamePlayMap { */ public void addNullToMap() { if (building) { - spawnList.set(index, null); + spawnList.add(null); } } public MapWindowData nextWindowData() { diff --git a/core/src/zero1hd/polyjet/entity/CollisionDetector.java b/core/src/zero1hd/polyjet/entity/CollisionDetector.java index 9a66a0a..82b976e 100755 --- a/core/src/zero1hd/polyjet/entity/CollisionDetector.java +++ b/core/src/zero1hd/polyjet/entity/CollisionDetector.java @@ -13,8 +13,8 @@ import com.badlogic.gdx.utils.Array; import zero1hd.polyjet.Main; public class CollisionDetector { - Array firstGroup; - Array secondGroup; + Array enemies; + Array allies; AssetManager assets; Preferences prefs; @@ -23,9 +23,9 @@ public class CollisionDetector { Array effects = new Array<>(); Sound explosionSFX; - public CollisionDetector(Array firstGroup, Array secondGroup, AssetManager assetManager, Preferences prefs) { - this.firstGroup = firstGroup; - this.secondGroup = secondGroup; + public CollisionDetector(Array enemies, Array allies, AssetManager assetManager, Preferences prefs) { + this.enemies = enemies; + this.allies = allies; assets = assetManager; this.prefs = prefs; @@ -34,28 +34,28 @@ public class CollisionDetector { } public void collisionCheck() { - if ((firstGroup.size != 0) && (secondGroup.size != 0)) { - for (int f = 0; f < firstGroup.size; f++) { - Entity fe = firstGroup.get(f); - for (int s = 0; s < secondGroup.size; s++) { - Entity se = secondGroup.get(s); + if ((enemies.size != 0) && (allies.size != 0)) { + for (int f = 0; f < enemies.size; f++) { + Entity enemy = enemies.get(f); + for (int s = 0; s < allies.size; s++) { + Entity ally = allies.get(s); - if (fe.getHitZone().overlaps(se.getHitZone())) { - Gdx.app.debug("Collision Detector", "Collision between entities: " + fe.getEntityType() + " and " + se.getEntityType()); + if (enemy.getHitZone().overlaps(ally.getHitZone())) { + Gdx.app.debug("Collision Detector", "Collision between entities: " + enemy.getEntityType() + " and " + ally.getEntityType()); //Play FX; - if (se.playCollideSFX() && fe.playCollideSFX()) { - explosionSFX.play(prefs.getFloat("fx vol"), 1f, (fe.getX()/Main.GAME_AREA_WIDTH)-0.55f); + if (ally.playCollideSFX() && enemy.playCollideSFX()) { + explosionSFX.play(prefs.getFloat("fx vol"), 1f, (enemy.getX()/Main.GAME_AREA_WIDTH)-0.55f); } - if (se.playCollidePFX() && fe.playCollidePFX()) { + if (ally.playCollidePFX() && enemy.playCollidePFX()) { PooledEffect currentPFX; currentPFX = explosionEffectPool.obtain(); - currentPFX.setPosition(fe.getX() + fe.getWidth()/2f, fe.getY() + fe.getHeight()/2f); + currentPFX.setPosition(enemy.getX() + enemy.getWidth()/2f, enemy.getY() + enemy.getHeight()/2f); effects.add(currentPFX); } - fe.collided(se); - se.collided(fe); + enemy.collided(ally); + ally.collided(enemy); break; } } diff --git a/core/src/zero1hd/polyjet/entity/Entity.java b/core/src/zero1hd/polyjet/entity/Entity.java index 94a0f0e..40dbad5 100755 --- a/core/src/zero1hd/polyjet/entity/Entity.java +++ b/core/src/zero1hd/polyjet/entity/Entity.java @@ -23,6 +23,7 @@ public class Entity extends Actor implements Poolable { protected boolean enemy; protected boolean simple = true; protected boolean nonStnrd = false; + protected boolean move = true; protected Rectangle hitbox; protected Sprite sprite; @@ -30,10 +31,11 @@ public class Entity extends Actor implements Poolable { protected Vector2 center; protected float angle; protected float speed; + + /** * called by the entity frame and only once (when this object is created). - * Since your not supposed to actually use the constructor; */ protected void setup(EntityController ec, EntityFrame ef) { this.ec = ec; @@ -43,14 +45,12 @@ public class Entity extends Actor implements Poolable { rotRatios = new Vector2(); center = new Vector2(); hitbox = new Rectangle(); - sprite = new Sprite(); - sprite.setOriginCenter(); - preInit(); } public void preInit() { if (sprite.getTexture() == null) throw new NullPointerException("what, your not going to have a texture for your entity?"); + sprite.setOriginCenter(); } public void init(HashMap params) { @@ -90,9 +90,11 @@ public class Entity extends Actor implements Poolable { @Override public void act(float delta) { if (!nonStnrd) { - rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle)); - center.set(getX() + getWidth()/2f, getY() + getHeight()/2f); - moveBy(rotRatios.x*speed*delta, rotRatios.y*speed*delta); + + if (move) { + move(delta, false); + } + if (simple) { sprite.setPosition(getX(), getY()); hitbox.setPosition(getX(), getY()); @@ -101,6 +103,7 @@ public class Entity extends Actor implements Poolable { } else { sprite.setCenter(center.x, center.y); hitbox.setCenter(center); + sprite.setOriginCenter(); sprite.setRotation(angle); } @@ -110,7 +113,6 @@ public class Entity extends Actor implements Poolable { ef.recycleEntity(this); } } - } @Override @@ -129,14 +131,32 @@ public class Entity extends Actor implements Poolable { public boolean playCollideSFX() { return true; } + + public void move(float delta, boolean update) { + rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle)); + moveBy(rotRatios.x*speed*delta, rotRatios.y*speed*delta); + center.set(getX() + getWidth()/2f, getY() + getHeight()/2f); + + if (update) { + if (simple) { + sprite.setPosition(getX(), getY()); + hitbox.setPosition(getX(), getY()); + } else { + sprite.setCenter(center.x, center.y); + hitbox.setCenter(center); + sprite.setOriginCenter(); + sprite.setRotation(angle); + } + } + } + @Override public void reset() { rotRatios.set(0, 0); hitbox.set(0, 0, 0, 0); - sprite.setBounds(0, 0, 0, 0); + sprite.setPosition(0, 0); sprite.setRotation(0); - sprite.setOrigin(0, 0); setPosition(0, 0); center.set(0, 0); angle = 0; diff --git a/core/src/zero1hd/polyjet/entity/EntityController.java b/core/src/zero1hd/polyjet/entity/EntityController.java index 1d1b37a..a375bde 100755 --- a/core/src/zero1hd/polyjet/entity/EntityController.java +++ b/core/src/zero1hd/polyjet/entity/EntityController.java @@ -44,13 +44,13 @@ public class EntityController { } private void setup() { - index.put(EntityIndex.VOID_CIRCLE, new EntityFrame<>(this, VoidCircle.class)); - index.put(EntityIndex.PELLET, new EntityFrame<>(this, Pellet.class)); - index.put(EntityIndex.SHARD, new EntityFrame<>(this, Shard.class)); - index.put(EntityIndex.BAR, new EntityFrame<>(this, Bar.class)); - index.put(EntityIndex.FLAKE, new EntityFrame<>(this, Flake.class)); + index.put(EntityIndex.VOID_CIRCLE, (voidCircle = new EntityFrame<>(this, VoidCircle.class))); + index.put(EntityIndex.PELLET, pellet = new EntityFrame<>(this, Pellet.class)); + index.put(EntityIndex.SHARD, shard = new EntityFrame<>(this, Shard.class)); + index.put(EntityIndex.BAR, bar = new EntityFrame<>(this, Bar.class)); + index.put(EntityIndex.FLAKE, flake = new EntityFrame<>(this, Flake.class)); - index.put(EntityIndex.LASER, new EntityFrame<>(this, Laser.class)); + index.put(EntityIndex.LASER, laser = new EntityFrame<>(this, Laser.class)); } public HashMap> getIndex() { diff --git a/core/src/zero1hd/polyjet/entity/ally/Laser.java b/core/src/zero1hd/polyjet/entity/ally/Laser.java index a17e5b2..72a6a4f 100755 --- a/core/src/zero1hd/polyjet/entity/ally/Laser.java +++ b/core/src/zero1hd/polyjet/entity/ally/Laser.java @@ -5,6 +5,7 @@ import java.util.HashMap; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; +import com.badlogic.gdx.graphics.g2d.Sprite; import zero1hd.polyjet.Main; import zero1hd.polyjet.entity.EntityIndex; @@ -16,7 +17,7 @@ public class Laser extends Entity { @Override public void preInit() { - sprite.setTexture(assets.get("laser.png", Texture.class)); + sprite = new Sprite(assets.get("laser.png", Texture.class)); sfx = assets.get("laser.ogg", Sound.class); setSize(0.25f, 2f); super.preInit(); @@ -46,11 +47,10 @@ public class Laser extends Entity { @Override public void act(float delta) { toBack(); - super.act(delta); - if (getY() > Main.GAME_AREA_HEIGHT) { dead = true; } + super.act(delta); } @Override @@ -61,6 +61,7 @@ public class Laser extends Entity { @Override public void reset() { dead = false; + super.reset(); } @Override diff --git a/core/src/zero1hd/polyjet/entity/ally/PolyJetEntity.java b/core/src/zero1hd/polyjet/entity/ally/PolyJetEntity.java index ae5d720..162800e 100755 --- a/core/src/zero1hd/polyjet/entity/ally/PolyJetEntity.java +++ b/core/src/zero1hd/polyjet/entity/ally/PolyJetEntity.java @@ -16,7 +16,6 @@ public class PolyJetEntity extends Entity { private ParticleEffect thrust; private Texture polyjet; private ParticleEffect teleportCloak; - private Rectangle hitbox; public boolean moveLeft, moveRight, moveUp, moveDown, teleporting, accelerate; private float speed, accel; @@ -97,4 +96,8 @@ public class PolyJetEntity extends Entity { return false; } } + + public Rectangle getHitbox() { + return hitbox; + } } diff --git a/core/src/zero1hd/polyjet/entity/enemies/Bar.java b/core/src/zero1hd/polyjet/entity/enemies/Bar.java index c692be6..7108372 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/Bar.java +++ b/core/src/zero1hd/polyjet/entity/enemies/Bar.java @@ -3,6 +3,7 @@ package zero1hd.polyjet.entity.enemies; import java.util.HashMap; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.math.Rectangle; import zero1hd.polyjet.Main; @@ -15,7 +16,7 @@ public class Bar extends Entity { @Override public void preInit() { setSize(8f, 0.5f); - sprite.setTexture(assets.get("bar.png", Texture.class)); + sprite = new Sprite(assets.get("bar.png", Texture.class)); enemy = true; super.preInit(); } @@ -46,6 +47,7 @@ public class Bar extends Entity { @Override public void reset() { dead = false; + super.reset(); } @Override diff --git a/core/src/zero1hd/polyjet/entity/enemies/Flake.java b/core/src/zero1hd/polyjet/entity/enemies/Flake.java index c8a6151..99181a3 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/Flake.java +++ b/core/src/zero1hd/polyjet/entity/enemies/Flake.java @@ -4,24 +4,24 @@ import java.util.HashMap; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; +import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.math.Rectangle; import zero1hd.polyjet.Main; import zero1hd.polyjet.entity.EntityIndex; import zero1hd.polyjet.entity.Entity; -import zero1hd.polyjet.entity.EntityController; public class Flake extends Entity { private float timer; private float totalTime; private Shard[] shards; - private EntityController ec; @Override public void preInit() { - sprite.setTexture(assets.get("flake.png", Texture.class)); + sprite = new Sprite(assets.get("flake.png", Texture.class)); simple = true; enemy = true; + move = false; setSize(3f, 3f); super.preInit(); } @@ -33,13 +33,13 @@ public class Flake extends Entity { shards[i].init(x, y, 360/shards.length*i, 0, 2); ec.getStage().addActor(shards[i]); } - setSize(3f, 3f); this.speed = rate; this.timer = fuse; this.totalTime = fuse; this.angle = angle; hitbox.setSize(getWidth(), getHeight()); - setPosition(x-center.x, y-center.y); + setPosition(x-getWidth()/2f, y-getHeight()/2f); + } /** @@ -67,19 +67,27 @@ public class Flake extends Entity { if (timer > 0) { timer -= delta; } + + move(delta, false); + System.out.println("---Start----"); + System.out.println("Flake: " + center); for (int i = 0; i < shards.length; i++) { - shards[i].setPosition(center.x-shards[i].getCenter().x, center.y-shards[i].getCenter().y); + shards[i].setPosition(center.x-shards[i].getWidth()/2f, center.y-shards[i].getWidth()/2f); + shards[i].move(delta, true); + System.out.println("Shard " + i + ": " + shards[i].getCenter()); + System.out.println("Sprite Pos: " + shards[i].getHitZone()); } if (getX() > Main.GAME_AREA_WIDTH || getY() > Main.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) { timer = 0; } + super.act(delta); } @Override public void draw(Batch batch, float parentAlpha) { - sprite.setColor(0.1f,0.1f,0.1f,1f - timer/totalTime); + sprite.setColor(0.1f,0.1f,0.1f, timer/totalTime); super.draw(batch, parentAlpha); } @@ -122,6 +130,7 @@ public class Flake extends Entity { shards = null; hitbox.set(0, 0, 0, 0); totalTime = 0; + super.reset(); } } diff --git a/core/src/zero1hd/polyjet/entity/enemies/Pellet.java b/core/src/zero1hd/polyjet/entity/enemies/Pellet.java index 3ba7176..9747553 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/Pellet.java +++ b/core/src/zero1hd/polyjet/entity/enemies/Pellet.java @@ -3,6 +3,7 @@ package zero1hd.polyjet.entity.enemies; import java.util.HashMap; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.utils.Pool.Poolable; import zero1hd.polyjet.Main; @@ -14,7 +15,7 @@ public class Pellet extends Entity implements Poolable { @Override public void preInit() { - sprite.setTexture(assets.get("pellet.png", Texture.class)); + sprite = new Sprite(assets.get("pellet.png", Texture.class)); setSize(0.5f, 0.5f); super.preInit(); } @@ -54,6 +55,7 @@ public class Pellet extends Entity implements Poolable { dead = true; break; } + super.collided(entity); } @Override @@ -69,6 +71,7 @@ public class Pellet extends Entity implements Poolable { @Override public void reset() { dead = false; + super.reset(); } } diff --git a/core/src/zero1hd/polyjet/entity/enemies/Shard.java b/core/src/zero1hd/polyjet/entity/enemies/Shard.java index 7c5483d..493e4c1 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/Shard.java +++ b/core/src/zero1hd/polyjet/entity/enemies/Shard.java @@ -2,7 +2,6 @@ package zero1hd.polyjet.entity.enemies; import java.util.HashMap; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Sprite; @@ -19,7 +18,8 @@ public class Shard extends Entity { @Override public void preInit() { sprite = new Sprite(assets.get("shard.png", Texture.class)); - sprite.setSize(2f, 3f); + setSize(2f, 2f); + sprite.setSize(3f, 2f); simple = false; enemy = true; super.preInit(); @@ -30,11 +30,9 @@ public class Shard extends Entity { this.hp = hp; maxHp = hp; this.angle = angle; - sprite.setRotation(angle+90); - setSize(2f, 2f); setPosition(x-(getWidth()/2f), y-(getHeight()/2f)); hitbox.setSize(getWidth(), getHeight()); - sprite.setOriginCenter(); + } /** @@ -58,7 +56,6 @@ public class Shard extends Entity { @Override public void act(float delta) { - if (getX() > Main.GAME_AREA_WIDTH || getY() > Main.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) { hp = 0; } @@ -68,8 +65,6 @@ public class Shard extends Entity { @Override public void draw(Batch batch, float parentAlpha) { sprite.setColor(((float)hp/(float)maxHp), ((float)hp/(float)maxHp), ((float)hp/(float)maxHp), 0.5f); - sprite.draw(batch); - batch.setColor(Color.WHITE); super.draw(batch, parentAlpha); } diff --git a/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java b/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java index c8d84bb..2dff1be 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java +++ b/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java @@ -3,15 +3,13 @@ package zero1hd.polyjet.entity.enemies; import java.util.HashMap; import com.badlogic.gdx.audio.Sound; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.Batch; -import com.badlogic.gdx.utils.Pool.Poolable; +import com.badlogic.gdx.graphics.g2d.Sprite; import zero1hd.polyjet.entity.EntityIndex; import zero1hd.polyjet.entity.Entity; -public class VoidCircle extends Entity implements Poolable { +public class VoidCircle extends Entity { private float timer; private float endRadius; private float currentRadius; @@ -24,8 +22,9 @@ public class VoidCircle extends Entity implements Poolable { @Override public void preInit() { - sprite.setTexture(assets.get("void_circle.png", Texture.class)); + sprite = new Sprite(assets.get("void_circle.png", Texture.class)); simple = false; + enemy = true; sound = assets.get("disintegrate.ogg", Sound.class); super.preInit(); } @@ -84,12 +83,6 @@ public class VoidCircle extends Entity implements Poolable { } - @Override - public void draw(Batch batch, float parentAlpha) { - batch.setColor(Color.WHITE); - super.draw(batch, parentAlpha); - } - @Override public void reset() { currentRadius = 0; @@ -100,6 +93,7 @@ public class VoidCircle extends Entity implements Poolable { done = false; begin = false; setSize(0, 0); + super.reset(); } public void growCurrentRadius(float radius) { diff --git a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java index 0ac0eb9..a5831b1 100755 --- a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java +++ b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java @@ -48,7 +48,7 @@ public class GamePlayArea extends Stage { polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard"); ec = new EntityController(assetManager, prefs, this); - collisionDetector = new CollisionDetector(ec.activeAllies, ec.activeEnemies, assetManager, prefs); + collisionDetector = new CollisionDetector(ec.activeEnemies, ec.activeAllies, assetManager, prefs); ec.activeAllies.add(polyjet); addActor(polyjet); }