- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplay.java
More file actions
Latest commit
36 lines (33 loc) · 677 Bytes
/
Copy pathDisplay.java
File metadata and controls
36 lines (33 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
importgreenfoot.*;
/**
* The Display class, to display instructions to the player when they first start the game.
*
* @author Matthew Hillier
* @version 1.0
*/
publicclassDisplayextendsOverworld
{
IntegerdisplayNum = 0;
/**
* Simply displays the instruction screen.
*/
publicDisplay()
{
setImage("Help.png");
}
/**
* Counts up, and then removes itself.
*/
publicvoidact()
{
if(displayNum < 40)
{
Greenfoot.delay(1);
displayNum++;
}
else
{
getWorld().removeObject(this);
}
}
}