public EndGameOverlay() : base() { background = new Switch("Sprites/Backgrounds/spr_game_over", Depth.OverlayBackground); AddChild(background); tagButton = new Switch("Sprites/Buttons/spr_btn_tag", Depth.OverlayButton); AddChild(tagButton); tagButton.SetOriginToLeftTop(); tagButton.LocalPosition = new Vector2(20, 120); getBallButton = new Switch("Sprites/Buttons/spr_btn_getball", Depth.OverlayButton); AddChild(getBallButton); getBallButton.LocalPosition = new Vector2(400, 770); rankButton = new Switch("Sprites/Buttons/spr_btn_rank", Depth.OverlayButton); AddChild(rankButton); rankButton.SetOriginToLeftBottom(); rankButton.LocalPosition = new Vector2(30, 1100); replayButton = new Switch("Sprites/Buttons/spr_btn_replay", Depth.OverlayButton); replayButton.SetOriginToCenterBottom(); AddChild(replayButton); replayButton.LocalPosition = new Vector2(350, 1100); shareButton = new Switch("Sprites/Buttons/spr_btn_share", Depth.OverlayButton); AddChild(shareButton); shareButton.SetOriginToRightBottom(); shareButton.LocalPosition = new Vector2(670, 1100); scoreText = new TextGameObject("Fonts/EndGameScore", Depth.OverlayButton, Color.White, TextGameObject.HorizontalAlignment.Center, TextGameObject.VerticalAlignment.Center); AddChild(scoreText); scoreText.LocalPosition = new Vector2(350, 252); highScoreText = new TextGameObject("Fonts/EndGameHighScore", Depth.OverlayButton, Color.White, TextGameObject.HorizontalAlignment.Center, TextGameObject.VerticalAlignment.Center); AddChild(highScoreText); highScoreText.LocalPosition = new Vector2(350, 400); additionMoneyText = new TextGameObject("Fonts/EndGameMoney", Depth.OverlayButton, Color.White, TextGameObject.HorizontalAlignment.Right, TextGameObject.VerticalAlignment.Center); AddChild(additionMoneyText); additionMoneyText.LocalPosition = new Vector2(640, 620); totalMoneyText = new TextGameObject("Fonts/EndGameMoney", Depth.OverlayButton, Color.White, TextGameObject.HorizontalAlignment.Left, TextGameObject.VerticalAlignment.Center); AddChild(totalMoneyText); totalMoneyText.LocalPosition = new Vector2(150, 620); getBallOverlay = new GetBallOverlay(); AddChild(getBallOverlay); confirmOverlay = new ConfirmOverlay(getBallOverlay); AddChild(confirmOverlay); tagOverlay = new TagOverlay(); AddChild(tagOverlay); warningOverlay = new WarningOverlay(); AddChild(warningOverlay); }
public ConfirmOverlay(GetBallOverlay getBallOverlay) : base() { this.getBallOverlay = getBallOverlay; background = new SpriteGameObject("Sprites/Backgrounds/spr_confirm", Depth.OverlayBackground2); AddChild(background); cancelButton = new Button("Sprites/Buttons/spr_btn_cancel", Depth.OverlayButton2); cancelButton.SetOriginToLeftCenter(); cancelButton.LocalPosition = new Vector2(30, 700); AddChild(cancelButton); continueButton = new Button("Sprites/Buttons/spr_btn_continue", Depth.OverlayButton2); continueButton.SetOriginToRightCenter(); continueButton.LocalPosition = new Vector2(670, 700); AddChild(continueButton); }