Beispiel #1
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     currentAnimation.Draw(spriteBatch);
     if (PowerAnimation.Active)
     {
         PowerAnimation.Draw(spriteBatch);
     }
     if (PowerHitAnimation.Active)
     {
         PowerHitAnimation.Draw(spriteBatch);
     }
 }
Beispiel #2
0
 public void Update(GameTime gameTime, Player player, ContentManager content)
 {
     if (!IsAlive)
     {
         return;
     }
     if ((100 * HP) / DRAGON_STARTING_HEALTH > 70)
     {
         UpdateStage1();
     }
     else if ((100 * HP) / DRAGON_STARTING_HEALTH > 40)
     {
         UpdateStage2(player);
     }
     else
     {
         UpdateStage3(player);
     }
     if (HitPlayer(player))
     {
         player.HP -= DRAGON_DAMAGE;
     }
     PlayerAttack(player, content);
     if (HP <= 0 && addPoint)
     {
         addPoint            = false;
         player.PlayerScore += DRAGON_POINT;
     }
     currentAnimation.Update(gameTime);
     if (PowerAnimation.Active)
     {
         PowerAnimation.Update(gameTime);
     }
     if (PowerHitAnimation.Active)
     {
         PowerHitAnimation.Update(gameTime);
     }
 }