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(); }
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); }
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); }