Esempio n. 1
0
 public void LoadContent()
 {
     animationImage.LoadContent();
     animationImage.StartAnimation();
     if (explosionDelayed != null)
     {
         explosionDelayed.Start();
     }
 }
Esempio n. 2
0
        public Bonus(BonusType bType, Vector2 position, int tileSize)
        {
            Rectangle rect = new Rectangle();

            bonusType = bType;
            switch (bonusType)
            {
            case BonusType.Count:
            {
                rect = new Rectangle(0 * tileSize, 0 * tileSize, tileSize, tileSize);
                break;
            }

            case BonusType.Power:
            {
                rect = new Rectangle(0 * tileSize, 1 * tileSize, tileSize, tileSize);
                break;
            }

            case BonusType.Move:
            {
                rect = new Rectangle(0 * tileSize, 2 * tileSize, tileSize, tileSize);
                break;
            }

            case BonusType.Detonator:
            {
                rect = new Rectangle(0 * tileSize, 3 * tileSize, tileSize, tileSize);
                break;
            }
            }

            Image imageTemp = new Image("Play/Bonus3x", rect, position);

            Image            = new AnimationImage(imageTemp, new List <int>(new int[] { 0, 1 }));
            Image.SwitchTime = 200;
            Image.StartAnimation();
        }