removed 'simple' entities
This commit is contained in:
parent
21473bcb0d
commit
439307d619
@ -25,7 +25,6 @@ public class Entity extends Actor implements Poolable {
|
|||||||
protected EntityManager ec;
|
protected EntityManager ec;
|
||||||
|
|
||||||
protected boolean enemy;
|
protected boolean enemy;
|
||||||
protected boolean simple = true;
|
|
||||||
protected boolean nonStnrd = false;
|
protected boolean nonStnrd = false;
|
||||||
protected boolean move = true;
|
protected boolean move = true;
|
||||||
|
|
||||||
@ -145,17 +144,10 @@ public class Entity extends Actor implements Poolable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updatePositionData() {
|
public void updatePositionData() {
|
||||||
if (simple) {
|
sprite.setCenter(center.x, center.y);
|
||||||
sprite.setPosition(getX(), getY());
|
hitbox.setCenter(center);
|
||||||
hitbox.setPosition(getX(), getY());
|
sprite.setOriginCenter();
|
||||||
sprite.setSize(getWidth(), getHeight());
|
sprite.setRotation(angle);
|
||||||
hitbox.setSize(getWidth(), getHeight());
|
|
||||||
} else {
|
|
||||||
sprite.setCenter(center.x, center.y);
|
|
||||||
hitbox.setCenter(center);
|
|
||||||
sprite.setOriginCenter();
|
|
||||||
sprite.setRotation(angle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7,6 +7,12 @@ public class EntityFrame<T extends Entity> {
|
|||||||
private EntityManager ec;
|
private EntityManager ec;
|
||||||
Class<T> ct;
|
Class<T> ct;
|
||||||
EntityFrame<T> ef;
|
EntityFrame<T> ef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages the entities pooling.
|
||||||
|
* @param entityController
|
||||||
|
* @param classType
|
||||||
|
*/
|
||||||
public EntityFrame(EntityManager entityController, Class<T> classType) {
|
public EntityFrame(EntityManager entityController, Class<T> classType) {
|
||||||
this.ct = classType;
|
this.ct = classType;
|
||||||
ef = this;
|
ef = this;
|
||||||
|
@ -18,7 +18,6 @@ public class Flake extends Entity {
|
|||||||
@Override
|
@Override
|
||||||
public void preInit() {
|
public void preInit() {
|
||||||
sprite = new Sprite(assets.get("flake.png", Texture.class));
|
sprite = new Sprite(assets.get("flake.png", Texture.class));
|
||||||
simple = true;
|
|
||||||
enemy = true;
|
enemy = true;
|
||||||
move = false;
|
move = false;
|
||||||
setSize(3f, 3f);
|
setSize(3f, 3f);
|
||||||
|
@ -19,7 +19,6 @@ public class Shard extends Entity {
|
|||||||
sprite = new Sprite(assets.get("shard.png", Texture.class));
|
sprite = new Sprite(assets.get("shard.png", Texture.class));
|
||||||
setSize(2f, 2f);
|
setSize(2f, 2f);
|
||||||
sprite.setSize(3f, 2f);
|
sprite.setSize(3f, 2f);
|
||||||
simple = false;
|
|
||||||
enemy = true;
|
enemy = true;
|
||||||
super.preInit();
|
super.preInit();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ public class VoidCircle extends Entity {
|
|||||||
@Override
|
@Override
|
||||||
public void preInit() {
|
public void preInit() {
|
||||||
sprite = new Sprite(assets.get("void_circle.png", Texture.class));
|
sprite = new Sprite(assets.get("void_circle.png", Texture.class));
|
||||||
simple = false;
|
|
||||||
enemy = true;
|
enemy = true;
|
||||||
sound = assets.get("disintegrate.ogg", Sound.class);
|
sound = assets.get("disintegrate.ogg", Sound.class);
|
||||||
super.preInit();
|
super.preInit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user