Wave unit pads

This commit is contained in:
Anuken
2018-09-12 10:28:45 -04:00
parent 2ee87ad078
commit 2ae65acc28
3 changed files with 20 additions and 8 deletions

View File

@@ -80,6 +80,11 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
}
}
},
patrol = new UnitState(){
public void update(){
//TODO
}
},
retreat = new UnitState(){
public void entered(){
target = null;
@@ -107,8 +112,9 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
@Override
public void onCommand(UnitCommand command){
state.set(command == UnitCommand.retreat ? retreat :
(command == UnitCommand.attack ? attack :
(null)));
(command == UnitCommand.attack ? attack :
(command == UnitCommand.patrol ? patrol :
(null))));
}
@Override

View File

@@ -76,6 +76,11 @@ public abstract class GroundUnit extends BaseUnit{
}
}
},
patrol = new UnitState(){
public void update(){
//TODO
}
},
retreat = new UnitState(){
public void entered(){
target = null;
@@ -94,7 +99,8 @@ public abstract class GroundUnit extends BaseUnit{
public void onCommand(UnitCommand command){
state.set(command == UnitCommand.retreat ? retreat :
(command == UnitCommand.attack ? attack :
(null)));
(command == UnitCommand.patrol ? patrol :
(null))));
}
@Override