This commit is contained in:
parent
e1c0fa7a48
commit
7e309db351
9 changed files with 16 additions and 18 deletions
|
|
@ -14,7 +14,7 @@ public class APU extends Unit{
|
|||
private Sprite sprite;
|
||||
|
||||
private Sound gunSound;
|
||||
private Sound moveSound;
|
||||
private Sound moveSound[] = new Sound[2];
|
||||
private Sound attackSound;
|
||||
private Sound selectSound;
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ public class APU extends Unit{
|
|||
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");
|
||||
moveSound[0] = new Sound("moveSound", "data/sounds/APUmove1.wav");
|
||||
moveSound[1] = new Sound("moveSound", "data/sounds/APUmove2.wav");
|
||||
selectSound = new Sound("selectSound", "data/sounds/APUselect.wav");
|
||||
attackSound = new Sound("attackSound", "data/sounds/APUattack.wav");
|
||||
|
||||
selectionBox = new SelectBox(40,40,getMaxLife());
|
||||
setLife(50);
|
||||
}
|
||||
|
||||
protected SelectBox getSelection() {
|
||||
|
|
@ -56,7 +56,7 @@ public class APU extends Unit{
|
|||
return gunSound;
|
||||
}
|
||||
public Sound getMoveSound() {
|
||||
return moveSound;
|
||||
return moveSound[(int)(Math.random()*2)];
|
||||
}
|
||||
public Sound getSelectSound() {
|
||||
return selectSound;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue