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();
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }
Beispiel #4
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");
 }