private void TutorialRender(Graphics g) { switch (tutorialState) { case INTROGAME: int yMid = GameFrame.SCREEN_HEIGHT / 2 - 15; int y1 = yMid - GameFrame.SCREEN_HEIGHT / 2 - openIntroGameY / 2; int y2 = yMid + openIntroGameY / 2; g.FillRectangle(Brushes.Black, 0, y1, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); g.FillRectangle(Brushes.Black, 0, y2, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); if (storyTutorial >= 1) { g.DrawImage(avatar.getImage(), 600, 350); g.FillRectangle(Brushes.Blue, 280, 450, 350, 80); string text = textTutorial.Substring(0, currentSize - 1); g.DrawString(text, new Font("Arial", 8), Brushes.White, 290, 480); } break; case MEETFINALBOSS: yMid = GameFrame.SCREEN_HEIGHT / 2 - 15; y1 = yMid - GameFrame.SCREEN_HEIGHT / 2 - openIntroGameY / 2; y2 = yMid + openIntroGameY / 2; g.FillRectangle(Brushes.Black, 0, y1, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); g.FillRectangle(Brushes.Black, 0, y2, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); break; } }
private void TutorialRender(Graphics g2) { SolidBrush brush = new SolidBrush(Color.White); switch (tutorialState) { case TutorialState.INTROGAME: int yMid = GameFrame.SCREEN_HEIGHT / 2 - 15; int y1 = yMid - GameFrame.SCREEN_HEIGHT / 2 - openIntroGameY / 2; int y2 = yMid + openIntroGameY / 2; brush.Color = Color.Black; g2.FillRectangle(brush, 0, y1, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); g2.FillRectangle(brush, 0, y2, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); if (storyTutorial >= 1) { g2.DrawImage(avatar.getImage(), 600, 350); brush.Color = Color.Blue; g2.FillRectangle(brush, 280, 450, 350, 80); brush.Color = Color.White; String text = textTutorial.Substring(0, currentSize - 1); drawString(g2, text, 290, 480); } break; case TutorialState.MEETreadonlyBOSS: yMid = GameFrame.SCREEN_HEIGHT / 2 - 15; y1 = yMid - GameFrame.SCREEN_HEIGHT / 2 - openIntroGameY / 2; y2 = yMid + openIntroGameY / 2; brush.Color = Color.Black; g2.FillRectangle(brush, 0, y1, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); g2.FillRectangle(brush, 0, y2, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT / 2); break; } }