Removed static things, fixed astar bugs. only thing left is bomber attacking ronge
This commit is contained in:
parent
91c3e77465
commit
526ce82d40
33 changed files with 293 additions and 196 deletions
|
|
@ -8,6 +8,7 @@ import ei.engine.ui.Button;
|
|||
import ei.engine.ui.UiComponent;
|
||||
import ei.engine.ui.UiHandler;
|
||||
import ei.engine.ui.UiListener;
|
||||
import ei.game.gamestate.InGameState;
|
||||
import ei.game.player.Player;
|
||||
import ei.game.scene.units.APU;
|
||||
import ei.game.scene.units.Bomber;
|
||||
|
|
@ -22,13 +23,15 @@ public class InGameBuildHud implements UiListener{
|
|||
private UiHandler ui;
|
||||
private Player player;
|
||||
private BitmapText queueSize;
|
||||
private InGameState inGameState;
|
||||
|
||||
public Button removeLastQueue;
|
||||
public Button apuBuildButton;
|
||||
public Button tankBuildButton;
|
||||
public Button bomberBuildButton;
|
||||
|
||||
public InGameBuildHud(int x ,int y, Player p){
|
||||
public InGameBuildHud(int x ,int y, Player p, InGameState inGameState){
|
||||
this.inGameState = inGameState;
|
||||
player = p;
|
||||
ui = new UiHandler("BuildMenu");
|
||||
|
||||
|
|
@ -95,15 +98,15 @@ public class InGameBuildHud implements UiListener{
|
|||
public void ActionEvent(UiComponent source){
|
||||
// builds a apu
|
||||
if(source == apuBuildButton){
|
||||
player.getCC().buildUnit(new APU(player));
|
||||
player.getCC().buildUnit(new APU(player, getInGameState()));
|
||||
}
|
||||
// builds a tank
|
||||
else if(source == tankBuildButton){
|
||||
player.getCC().buildUnit(new Tank(player));
|
||||
player.getCC().buildUnit(new Tank(player, getInGameState()));
|
||||
}
|
||||
// builds a bomber
|
||||
else if(source == bomberBuildButton){
|
||||
player.getCC().buildUnit(new Bomber(player));
|
||||
player.getCC().buildUnit(new Bomber(player, getInGameState()));
|
||||
}
|
||||
|
||||
// removes the last unit in the queue
|
||||
|
|
@ -111,4 +114,8 @@ public class InGameBuildHud implements UiListener{
|
|||
player.getCC().removeLast();
|
||||
}
|
||||
}
|
||||
|
||||
public InGameState getInGameState(){
|
||||
return inGameState;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue