-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstartScreen.java
More file actions
35 lines (32 loc) · 835 Bytes
/
startScreen.java
File metadata and controls
35 lines (32 loc) · 835 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
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class startScreen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class startScreen extends Actor
{
boolean visible = true;
/**
* Act - do whatever the startScreen wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if(Greenfoot.mouseClicked(this)){
visible = false;
}
if(visible = true){
setImage("startscreen.jpg");
}
else{
setImage("void.PNG");
}
}
protected void addedToWorld(World world)
{
setImage("images/startscreen.jpg");
world = getWorld();
}
}