Example #1
0
        public GetBallOverlay() : base()
        {
            giftBox = new AnimatedGameObject(Depth.GiftBox);
            giftBox.LoadAnimation("Sprites/Animations/spr_animation_getball@4x3", "box", false, 0.05f);
            giftBox.PlayAnimation("box", true);
            giftBox.SetOriginToCenter();
            giftBox.LocalPosition = new Vector2(320, 600);
            AddChild(giftBox);

            glowing = new AnimatedGameObject(Depth.OverlayButton2);
            glowing.LoadAnimation("Sprites/Animations/spr_animation_glowing@5x2", "glowing", true, 0.1f);
            glowing.PlayAnimation("glowing", true);
            glowing.SetOriginToCenter();
            glowing.LocalPosition = new Vector2(350, 500);
            AddChild(glowing);

            background = new SpriteGameObject("Sprites/Backgrounds/spr_getball", Depth.OverlayBackground2);
            AddChild(background);

            message = new TextGameObject("Fonts/GetBall", Depth.OverlayMessage, Color.White, TextGameObject.HorizontalAlignment.Center, TextGameObject.VerticalAlignment.Center);
            AddChild(message);
            message.Visible       = false;
            message.Text          = "Click to get ball";
            message.LocalPosition = new Vector2(350, 900);

            fireWorkMaker = new ListStar(Depth.RandomBall + 0.001f);
            AddChild(fireWorkMaker);
            Reset();
        }
Example #2
0
 public override void Show()
 {
     base.Show();
     giftBox.PlayAnimation("box", true);
     timeEslapsed    = 0f;
     message.Visible = false;
     randomBall      = new RandomBall(GameSettingHelper.GetRandomBall().LargeSpritePath);
     glowing.Visible = false;
     ExtendedGame.AssetManager.PlaySoundEffect("Sounds/snd_gift");
 }
Example #3
0
        private AnimatedGameObject CreateClearColumnEffect()
        {
            AnimatedGameObject newObject = new AnimatedGameObject(Depth.Effect);

            newObject.LoadAnimation("Sprites/Animations/spr_animation_item_break_vertical@9", "col", false, 0.01f);
            newObject.PlayAnimation("col", true);
            newObject.SetOriginToCenter();
            newObject.LocalPosition = new Vector2(50 + column * 100, 600);

            return(newObject);
        }
Example #4
0
        private AnimatedGameObject CreateClearRowEffect()
        {
            AnimatedGameObject newObject = new AnimatedGameObject(Depth.Effect);

            newObject.LoadAnimation("Sprites/Animations/spr_animation_item_break_horizontal@1x11", "row", false, 0.01f);
            newObject.PlayAnimation("row", true);
            newObject.SetOriginToCenter();
            newObject.LocalPosition = new Vector2(350, 200 + Row * 100);

            return(newObject);
        }
 //scrolling left through the selection is -1
 public void ChangeSpriteLeft(AnimatedGameObject obj, int animationIndex, int index)
 {
     if (animationIndex == 1)
     {
         characterSelectIndex[index] = 4;
     }
     else
     {
         characterSelectIndex[index] -= 1;
     }
     obj.PlayAnimation("maiden" + characterSelectIndex[index].ToString());
     borderSprites[index].GetColor = lockInColor[(characterSelectIndex[index] - 1) * 2];
 }
 //scrolling right through the selection is +1
 public void ChangeSpriteRight(AnimatedGameObject obj, int animationIndex, int index)
 {
     //Check if the index is not at max, if so change the index number to the lowest number (=1)
     if (animationIndex == 4)
     {
         characterSelectIndex[index] = 1;
     }
     else
     {
         characterSelectIndex[index] += 1;
     }
     obj.PlayAnimation("maiden" + characterSelectIndex[index].ToString());
     borderSprites[index].GetColor = lockInColor[(characterSelectIndex[index] - 1) * 2];
 }
Example #7
0
 public Bar(int t, string id, int layer = 9, int sheetIndex = 1)
     : base("Sprites/bar2", layer, id, sheetIndex)
 {
     playsound     = true;
     type          = t;
     this.Position = new Vector2(20, 30 * t);
     if (type == 4)
     {
         this.position += new Vector2(0, 20);
     }
     barPart = WifiWars.AssetManager.Content.Load <Texture2D>("Sprites/bar");
     car     = new AnimatedGameObject();
     car.LoadAnimation("Sprites/Police@2", "car", true);
     resource      = 0;
     totalResource = 1000;
     car.PlayAnimation("car");
 }