예제 #1
0
 public override void Update()
 {
     if (velocity.X != 0 || velocity.Y != 0)
     {
         DetectCollision();
     }
     if (South)
     {
         velocity.Y = 0;
     }
     if (North && velocity.Y < 0)
     {
         velocity.Y = 0;
     }
     if (East && velocity.X > 0)
     {
         velocity.X = 0;
     }
     if (West && velocity.X < 0)
     {
         velocity.X = 0;
     }
     UpdateVelocity();
     AI.NextMove();
     damageIndicator.Update(SpriteRectangle);
 }
예제 #2
0
 public void Update(GameTime gameTime, int playerHealth)
 {
     _playerDamageIndicator.Update(gameTime, playerHealth);
 }