public void update()
 {
     if (Player.playerRect.Bottom >= goombaRect.Top - 64 &&
         Player.playerRect.Right >= goombaRect.Left - 32 &&
         Player.playerRect.Left <= goombaRect.Right - 32)
     {
         isDead = true;
     }
     timer++;
     if (isDead)
     {
         deadCounter++;        // how long goomba has been dead
     }
     movement(movementType);
     x           += -Tile.getTileSpeed() + xa;
     goombaRect.X = (int)x; // update to keep over entity
     if (isDead)
     {
         currSprite = deadSprite;
     }
     else
     {
         animSprite.update();
         currSprite = animSprite.animation();
     }
 }
Beispiel #2
0
 public void update()
 {
     x         -= Tile.getTileSpeed();
     coinRect.X = (int)x; // update to keep over entity
     animSprite.update();
     currSprite = animSprite.animation();
 }
Beispiel #3
0
 public void update()
 {
     x += -Tile.getTileSpeed();
     animSprite.update();
     currSprite = animSprite.animation();
 }