Exemplo n.º 1
0
        public WinningScreen()
        {
            Stage = SummerizedStage.Score;

            RestartButton = WindowFactory.CreateButton("Restart");
            NextButton    = WindowFactory.CreateButton("Next");

            RestartButton.Position = new Vector2()
            {
                X = GetControlXPosition(NextButton, 1, 2),
                Y = Position.Y + Height * 0.75f,
            };

            NextButton.Position = new Vector2()
            {
                X = GetControlXPosition(NextButton, 2, 2),
                Y = Position.Y + Height * 0.75f,
            };

            WinningText = new Label(FontLoader.Load("HeaderFont"), "You Win!", GlobalData.Theme["Blue"]);
            ScoreText   = new Label(FontLoader.Load("HeaderFont"), "", GlobalData.Theme["LightMagenta"]);

            Star1 = WindowFactory.CreateStar();
            Star2 = WindowFactory.CreateStar();
            Star3 = WindowFactory.CreateStar();

            Star2.Position = new Vector2()
            {
                X = Position.X + Width / 2 - Star1.Width / 2,
                Y = Position.Y + Height * 0.30f,
            };

            Star1.Position = new Vector2()
            {
                X = Position.X + Width / 2 - Star1.Width / 2 - Star1.Width * 1.25f,
                Y = Star2.Position.Y + 20,
            };

            Star3.Position = new Vector2()
            {
                X = Position.X + Width / 2 - Star1.Width / 2 + Star1.Width * 1.25f,
                Y = Star2.Position.Y + 20,
            };

            addStar1 = new DelayedAction(Star1.Shine, 0.5f);
            addStar2 = new DelayedAction(Star2.Shine, 1.0f);
            addStar3 = new DelayedAction(Star3.Shine, 1.5f);
        }