Esempio n. 1
0
 public void draw(GraphicsWrapper g, Panel minigamePanel, Timer minigameTimer, uint minigameTime)
 {
     for (int i = 0; i < enemies.Count; i++)
     {
         g.DrawRectangle(new RectangleF(enemies[i].toPointF(), new SizeF(10, 10)), Color.Red);
     }
     g.DrawRectangle(new RectangleF(player.toPointF(), new SizeF(10, 10)), Color.Green);
     g.DrawSizedString(lives.ToString(), 7, player.toPointF(), Brushes.White, true, true);
 }
Esempio n. 2
0
 public void draw(GraphicsWrapper g, Panel minigamePanel, Timer minigameTimer, uint minigameTime)
 {
     for (int y = 0; y < 23; ++y)
     {
         for (int x = 0; x < 10; x++)
         {
             if (grid[y, x] == 1 | droppedtetrominoeLocationGrid[y, x] == 1)
             {
                 g.DrawRectangle(new RectangleF(x * 10, y * 10, 10, 10), Color.White, false, false);
             }
         }
         g.DrawLine(new Point(0, (y + 1) * 10), new Point(10 * 10, (y + 1) * 10), Color.DarkGray, 1, false);
     }
     for (int x = 0; x < 10; x++)
     {
         g.DrawLine(new Point((x + 1) * 10, 0), new Point((x + 1) * 10, 23 * 10), Color.DarkGray, 1, false);
     }
     g.DrawSizedString("Level " + level, 10, new PointF(150, 10), Brushes.White, false);
     g.DrawSizedString("Score " + score, 10, new PointF(150, 30), Brushes.White, false);
     g.DrawSizedString("LinesCleared " + linesCleared, 10, new PointF(150, 50), Brushes.White, false);
 }
Esempio n. 3
0
 private void tutorialPanel_Paint(object sender, PaintEventArgs e)
 {
     using (GraphicsWrapper g = new GraphicsWrapper(e.Graphics, Color.Red, new Rectangle(Point.Empty, tutorialPanel.Size), true))
     {
         for (int i = 0; i < 40; i++)
         {
             for (int j = 0; j < 40; j++)
             {
                 g.DrawLine(new PointF(tutorialPanel.Width / 2, tutorialPanel.Height / 2), new PointF(i * 10 + 5, j * 10 + 5), Color.DarkGray, 1, false);
             }
         }
         g.DrawSizedString("This is " + ((timertime < 17) ? "bad" : (timertime <= 33) ? "neutral" : "you"), 10, new PointF(tutorialPanel.Width / 2, tutorialPanel.Height / 2), new SolidBrush((timertime < 17) ? Color.Red : (timertime <= 33) ? Color.White : Color.Green), true, true);
     }
 }