-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelpMenu.java
More file actions
23 lines (20 loc) · 969 Bytes
/
Copy pathHelpMenu.java
File metadata and controls
23 lines (20 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* This class represents the Help Menu screen.
* It displays instructions for the players.
*
@authors (Rupert & Raymond Van Niekerk)
* @student Numbers (222894237 & 221154469)
* @version (1)
*/
public class HelpMenu extends World {
public HelpMenu() {
super(800, 600, 1);
GreenfootImage image = new GreenfootImage("->Player 1: W/S to move up and down.\n->Player 2: Up/Down to move up and down\n->Press Space to release the ball\n ->If Mushroom collected- Player Paddle Grow.\n->If Red Pill collected - Player paddle will Schrink.\n->Effects last only 6 seconds.",
28, Color.BLACK, null);
getBackground().drawImage(image, getWidth()/2 -235, getHeight()/2 + 50);
// Add a back button to the world
Button backButton = new Button("Back");
addObject(backButton, getWidth() / 2, getHeight() - 50);
}
}