[engine] fix
This commit is contained in:
@@ -35,14 +35,16 @@ class BrickState implements IState<Brick> {
|
||||
class EntityState implements IState<Entity> {
|
||||
private var x:Float;
|
||||
private var y:Float;
|
||||
private var d:Direction;
|
||||
private var type:Int;
|
||||
|
||||
public function new() {}
|
||||
|
||||
public function update(object:Entity):Bool {
|
||||
if (x != object.rect.x || y != object.rect.y) {
|
||||
if (x != object.rect.x || y != object.rect.y || !d.equals(object.rect.direction)) {
|
||||
x = object.rect.x;
|
||||
y = object.rect.y;
|
||||
d = object.rect.direction;
|
||||
return true;
|
||||
}
|
||||
if (Std.is(object, Tank)) {
|
||||
|
||||
Reference in New Issue
Block a user