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
|
|
@ -4,13 +4,13 @@ import ei.engine.math.Vector2f;
|
|||
import ei.engine.math.Vector2i;
|
||||
import ei.engine.scene.Sprite;
|
||||
import ei.engine.sound.Sound;
|
||||
import ei.game.gamestate.InGameState;
|
||||
import ei.game.network.entities.NetworkUnit;
|
||||
import ei.game.player.Player;
|
||||
import ei.game.scene.SelectBox;
|
||||
import ei.game.scene.weapons.Explotion;
|
||||
import ei.game.scene.weapons.MachineGun;
|
||||
import ei.game.scene.weapons.Weapon;
|
||||
import ei.game.scene.weapons.WeaponHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,12 +26,12 @@ public class APU extends NetworkUnit{
|
|||
private Sound attackSound;
|
||||
private Sound selectSound;
|
||||
|
||||
public APU(Player p) {
|
||||
super(70, p);
|
||||
public APU(Player p, InGameState inGameState) {
|
||||
super(70, p, inGameState);
|
||||
}
|
||||
|
||||
public APU(int x, int y, Player p){
|
||||
super(70, new Vector2i(x,y), p);
|
||||
public APU(int x, int y, Player p, InGameState inGameState){
|
||||
super(70, new Vector2i(x,y), p, inGameState);
|
||||
}
|
||||
|
||||
public void init(){
|
||||
|
|
@ -68,13 +68,13 @@ public class APU extends NetworkUnit{
|
|||
* of unit.
|
||||
*/
|
||||
public Weapon getWeapon(Vector2f startPos) {
|
||||
return new MachineGun(startPos);
|
||||
return new MachineGun(startPos, getInGameState());
|
||||
}
|
||||
/**
|
||||
* This unit type is now destroyed.
|
||||
*/
|
||||
public void destroyed(){
|
||||
WeaponHandler.getInstance().addWeapon(new Explotion(new Vector2f(getNode().getLocation().getX(), getNode().getLocation().getY())));
|
||||
getInGameState().getWeaponHandler().addWeapon(new Explotion(new Vector2f(getNode().getLocation().getX(), getNode().getLocation().getY()), getInGameState()));
|
||||
}
|
||||
public Sound getGunSound() {
|
||||
return gunSound;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue