public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Color16.Black);

            canvas.WriteTextCenter(3, "S N A K E", Color16.White, Color16.Black);
            canvas.WriteTextCenter(5, "Thanks for playing!", Color16.Lime, Color16.Black);
        }
Esempio n. 2
0
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Black);

            canvas.WriteTextCenter(2, "                       ", White, DarkRed);
            canvas.WriteTextCenter(3, "   <<< GAME OVER >>>   ", White, DarkRed);
            canvas.WriteTextCenter(4, "                       ", White, DarkRed);

            canvas.WriteTextCenter(7, $"{gameOverInfo.Reason}", Yellow, Black);

            canvas.WriteTextCenter(10, $"Player: {gameOverInfo.PlayerName}", Lime, Black);
            canvas.WriteTextCenter(12, $"SCORE: {gameOverInfo.Score}", LightTeal, Black);

            if (placement.HasValue)
            {
                canvas.WriteTextCenter(15, $"Congratulations!", White, Black);
                canvas.WriteTextCenter(16, $"You have earned enough points to be ranked!", Silver, Black);

                int x = placementImage.Size.AsRectangle.CenterAt(canvas.Size.AsRectangle.Center).TopLeft.X;
                int y = canvas.Size.Height - placementImage.Size.Height - 5;

                canvas.DrawImage(placementImage, new Point(x, y));
            }

            canvas.WriteTextCenter(canvas.Size.Height - 2, "-- Presc ESC to back to main menu --", Silver, Black);
        }
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Color16.Black);
            canvas.WriteTextCenter(1, Resources.TextHiScores, hiScoresAnimation.CurrentFrame, Color16.Black);

            var appearance     = new WindowAppearance(Color16.Black, Color16.Lime, Color16.Yellow);
            var hiScoresWindow = new HiScoresWindow(hiScores, appearance);

            var winPosition = hiScoresWindow.Size.AsRectangle.CenterAt(canvas.Size.AsRectangle.Center).TopLeft;

            hiScoresWindow.Paint(canvas, winPosition);

            canvas.WriteTextCenter(canvas.Size.Height - 2, "-- Presc ESC to back --", Color16.Silver, Color16.Black);
        }
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Black);

            canvas.WriteTextCenter(2, Resources.TextCredits, colorAnimation.CurrentFrame, Black);

            canvas.WriteTextCenter(10, "Special thanks to:", LightTeal, Black);
            canvas.WriteTextCenter(12, "No one...", Yellow, Black);

            canvas.WriteTextCenter(16, "2017-2021", Silver, Black);

            canvas.WriteTextCenter(18, "Created by: Eryk Kisieliński", Gray, Black);

            canvas.WriteTextCenter(canvas.Size.Height - 2, "-- Presc ESC to back --", Silver, Black);
        }
Esempio n. 5
0
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Color16.Black);

            terrainRenderer.Paint(gameLogic.TerrainReader, canvas, new Point(31, 0));

            PaintStatsWindow(canvas);

            var scoreView = canvas.Slice(new Rectangle(new Point(1, 21), new Size(28, 76)));

            scoreView.WriteTextCenter(0, new string( '─', scoreView.Size.Width ), Color16.Teal, Color16.Black);
            scoreView.WriteTextCenter(0, " SCORE ", Color16.Yellow, Color16.Black);

            bigDigitsScoreUI.DrawCenter(scoreView, 2);
        }
Esempio n. 6
0
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Color16.Black);

            canvas.WriteTextCenter(2, Resources.TextLogo, Color16.Red, Color16.Black);

            var menuWindow = new OptionsListWindow <MainMenuEntry>(optionSelector);

            var rectCenter = menuWindow.Size.AsRectangle.CenterAt(canvas.Size.AsRectangle.Center);

            menuWindow.Paint(canvas, rectCenter.TopLeft.AddToY(2));

            // print version

            var version  = 'v' + Resources.SnakeGameVersion;
            var position = new Point(canvas.Size.Width - version.Length - 1, canvas.Size.Height - 1);

            canvas.WriteText(position, version, Color16.Gray, Color16.Black);
        }
Esempio n. 7
0
        public override void ProcessCanvas(TextCanvas canvas)
        {
            canvas.ClearColor(Black);

            canvas.WriteTextCenter(4, "                 ", Lime, Green);
            canvas.WriteTextCenter(5, "   How To Play   ", Yellow, Green);
            canvas.WriteTextCenter(6, "                 ", Lime, Green);

            canvas.WriteText(new(15, 10), "There are points for every apple eaten. Get as many points as you can.\r\n"
                             + "Do not go out of the board and do not touch your own tail.", Lime, Black);

            canvas.WriteText(new(15, 13), "o", Lime, Black);
            canvas.WriteText(new(17, 13), "- normal apple, 8 points", Silver, Black);

            canvas.WriteText(new(15, 15), "o", Red, Black);
            canvas.WriteText(new(17, 15), "- transient apple, 20..60 points", Silver, Black);

            canvas.WriteText(new(15, 17), "Each eaten apple lengthens the body of the snake\r\nand slightly accelerates its movement.",
                             LightTeal, Black);

            canvas.WriteText(new(15, 20), "Too many apples on the field end up losing.", Pink, Black);

            canvas.WriteTextCenter(canvas.Size.Height - 2, "-- Presc ESC to back --", Silver, Black);
        }