Exemple #1
0
 @Override
 public void onLivesChanged(int lives) {
   if (lives - 1 == this.lives) {
     Assets.playSound(Assets.extraLifeSound);
   }
   this.lives = lives;
 }
Exemple #2
0
 @Override
 public void onRobotDestroyed(Robot robot) {
   if (lastRobotHitTime != now) {
     Assets.playSound(Assets.killRobotSound);
     lastRobotHitTime = now;
   }
 }
Exemple #3
0
 @Override
 public void onRobotFired(Robot robot) {
   if (lastRobotFireTime != now) {
     Assets.playSound(Assets.robotShotSound);
     lastRobotFireTime = now;
   }
 }
Exemple #4
0
 @Override
 public void onCaptainActivated(float time) {
   Assets.playSound(Assets.captainEnterRoomSpeech);
   // We can't do much about any speech going on, but we can make sure nothing else talks over the
   // top of this
   // one.
   scheduleTaunt();
 }
Exemple #5
0
 @Override
 public void onPlayerHit() {
   if (lastPlayerHitTime != now) {
     canTaunt = false;
     Assets.playSound(Assets.killPlayerSound);
     lastPlayerHitTime = now;
   }
 }
Exemple #6
0
 @Override
 public void onExitedRoom(float time, int robots) {
   isChicken = robots > 0;
   if (isChicken) {
     Assets.playSound(Assets.exitRoomAsChickenSpeech);
   }
   canTaunt = false;
 }
Exemple #7
0
 public void update(float delta) {
   now += delta;
   if (canTaunt && now >= nextTauntTime) {
     Sound[] sounds = isChicken ? Assets.chickenTaunts : Assets.standardTaunts;
     Assets.playSound(sounds[random(sounds.length - 1)]);
     scheduleTaunt();
   }
 }
Exemple #8
0
 @Override
 public void onPlayerFired() {
   Assets.playSound(Assets.playerShotSound);
 }
Exemple #9
0
 @Override
 public void onEnteredRoom(float time, int robots) {
   Assets.playSound(Assets.spawnPlayerSound);
 }
Exemple #10
0
 @Override
 public void onAttained(Achievements achievement) {
   Assets.playSound(Assets.achievementSound);
 }