コード例 #1
0
ファイル: Enemy.cs プロジェクト: shaqq/bobo-2d-xna
 private void ShootFireball(GameScreen screen)
 {
     if (isFiring)
     {
         sprite.PlayAnimation(runAnimation);
         Fireball f = new Fireball(screen, Level, "enemyfire");
         //f.loadContent();
         if ((int)direction == 1)
         {
             f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25),
                    new Vector2(200, 200), new Vector2(1, 0), "enemyfire");
         }
         else
         {
             f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25),
                    new Vector2(200, 200), new Vector2(-1, 0), "enemyfire");
         }
         mFireballs.Add(f);
     }
 }
コード例 #2
0
ファイル: Bobo.cs プロジェクト: shaqq/bobo-2d-xna
 private void ShootFireball(GameScreen screen)
 {
     if (isFiring && (numFireBalls > 0))
     {
         sprite.PlayAnimation(fireAnimation);
         Fireball f = new Fireball(screen, Level, "");
         //f.loadContent();
         if (flip == SpriteEffects.FlipHorizontally)
         {
             f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25),
                    new Vector2(200, 200), new Vector2(1, 0), "");
         }
         else
         {
             f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25),
                    new Vector2(200, 200), new Vector2(-1, 0), "");
         }
         mFireballs.Add(f);
         numFireBalls--;
     }
 }
コード例 #3
0
ファイル: Enemy.cs プロジェクト: shaqq/bobo-2d-xna
 private void ShootFireball(GameScreen screen)
 {
     if (isFiring)
     {
         sprite.PlayAnimation(runAnimation);
         Fireball f = new Fireball(screen, Level, "enemyfire");
         //f.loadContent();
         if ((int)direction == 1)
             f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25),
                 new Vector2(200, 200), new Vector2(1, 0), "enemyfire");
         else
             f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25),
                 new Vector2(200, 200), new Vector2(-1, 0), "enemyfire");
         mFireballs.Add(f);
     }
 }
コード例 #4
0
ファイル: Bobo.cs プロジェクト: shaqq/bobo-2d-xna
 private void ShootFireball(GameScreen screen)
 {
     if (isFiring && (numFireBalls > 0))
     {
         sprite.PlayAnimation(fireAnimation);
         Fireball f = new Fireball(screen,Level, "");
         //f.loadContent();
         if (flip == SpriteEffects.FlipHorizontally)
             f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25),
                 new Vector2(200, 200), new Vector2(1, 0), "");
         else
             f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25),
                 new Vector2(200, 200), new Vector2(-1, 0), "");
         mFireballs.Add(f);
         numFireBalls--;
     }
 }