This commit is contained in:
Jesper Lundin 2007-04-23 13:58:47 +00:00
parent 5c5084f211
commit a92a0c021e
20 changed files with 281 additions and 12 deletions

View file

@ -3,6 +3,7 @@ package ei.game.scene.units;
import ei.engine.math.Vector2f;
import ei.engine.math.Vector2i;
import ei.engine.scene.Sprite;
import ei.engine.sound.Sound;
import ei.game.player.Player;
import ei.game.scene.SelectBox;
import ei.game.scene.weapons.MachineGun;
@ -11,6 +12,12 @@ import ei.game.scene.weapons.Weapon;
public class APU extends Unit{
private SelectBox selectionBox;
private Sprite sprite;
private Sound gunSound;
private Sound moveSound;
private Sound attackSound;
private Sound selectSound;
public APU(Player p) {
this(0, 0, p);
}
@ -20,6 +27,9 @@ public class APU extends Unit{
this.sprite = new Sprite("APU", "data/units/apu/apu0000.png");
sprite.setSize(new Vector2f(40,40));
getNode().add(sprite);
gunSound = new Sound("gunSound", "data/sounds/machinegun.wav");
moveSound = new Sound("moveSound", "data/sounds/APUmove1.wav");
selectSound = new Sound("selectSound", "data/sounds/APUselect.wav");
selectionBox = new SelectBox(40,40,getMaxLife());
setLife(50);
@ -40,6 +50,15 @@ public class APU extends Unit{
*/
public void destroyed(){
}
public Sound getGunSound() {
return gunSound;
}
public Sound getMoveSound() {
return moveSound;
}
public Sound getSelectSound() {
return selectSound;
}
/**
* returns the velocity of the unit type.