Пример #1
0
 public void startTeleport(float xx, float yy) {
   if ((m_inTeleport == false) && (m_dying == false)) {
     m_teleportAnimation = new AnimateMoveTo(1.5f, this.getX(), this.getY(), xx, yy);
     m_inTeleport = true;
     m_teleportState = 0;
     this.stopSound("buggyDrive");
     this.stopAllAnimations();
     m_invincibleAnimation.stop();
     m_dx = 0;
     m_dy = 0;
     this.runAnimation(m_teleportOut);
     this.playSound("teleportIn", 0.75f);
   }
 }
Пример #2
0
 public void dieNow() {
   Gdx.app.debug("BuggySprite", "dieNow called");
   if ((m_dying == false) && (m_alive)) {
     Gdx.app.debug("BuggyrSprite", "dying!!!!");
     this.playSound("vaporize", 0.8f);
     m_inHit = false;
     m_ignoreHits = 0;
     m_explodeDeath = true;
     m_energy = 0;
     this.stopAllAnimations();
     m_invincibleAnimation.stop();
     this.stopSound("buggyDrive");
     PooledEffect effect = m_gameLayer.bombEffectPool.obtain();
     effect.setPosition(this.getX() + this.getWidth() / 2, this.getY());
     m_gameLayer.addParticleEffect(effect);
     this.runAnimation(m_throughDoorAnimation);
     m_dying = true;
     m_deadState = 1;
     if (m_focus == false) {
       m_gameLayer.buggyDieWithoutFocus();
     }
   }
 }