Added ground unit factory support
This commit is contained in:
@@ -37,8 +37,8 @@ public class TileEntity extends Entity{
|
||||
public TileEntity init(Tile tile, boolean added){
|
||||
this.tile = tile;
|
||||
this.added = added;
|
||||
x = tile.worldx();
|
||||
y = tile.worldy();
|
||||
x = tile.drawx();
|
||||
y = tile.drawy();
|
||||
|
||||
health = tile.block().health;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public class FlyingUnitType extends UnitType {
|
||||
speed = 0.2f;
|
||||
maxVelocity = 4f;
|
||||
drag = 0.01f;
|
||||
isFlying = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,6 +54,10 @@ public abstract class UnitType {
|
||||
//TODO doesn't do anything
|
||||
}
|
||||
|
||||
public boolean isFlying(){
|
||||
return isFlying;
|
||||
}
|
||||
|
||||
public void update(BaseUnit unit){
|
||||
if(unit.hitTime > 0){
|
||||
unit.hitTime -= Timers.delta();
|
||||
|
||||
Reference in New Issue
Block a user