Example #1
0
        public void OnDraw(long frame, ITurtleDrawing drawing)
        {
            // when that happens, generate new location for square
            // Bonus: Add counter number times caught
            Color color = Colors.Red;             //new Color ((byte)(random.Next () % 256), (byte)(random.Next () % 256), (byte)(random.Next () % 256));

            drawing.Fill(color);

            drawing.DrawSquare(Colors.Green, SquarePosition, SquareSize);
            drawing.DrawText(Colors.White, new Point(16, 16), CaughtCount.ToString());
            drawing.DrawTurtle(TurtlePosition);
        }
Example #2
0
        public void OnDraw(long frame, ITurtleDrawing drawing)
        {
            HandlePhysics();

            drawing.Fill(Colors.Black);

            // Pool
            drawing.DrawSquare(Colors.Blue, new Point(200, 250), new Size(70, 25));

            // Ground
            drawing.DrawSquare(new Color(139, 69, 19), new Point(0, 260), new Size(500, 25));

            // Hero
            drawing.DrawTurtle(TurtlePosition);
        }