-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instrucciones.java
41 lines (37 loc) · 943 Bytes
/
Instrucciones.java
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
37
38
39
40
41
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Instrucciones here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Instrucciones extends World
{
/**
* Constructor for objects of class Instrucciones.
*
*/
public Instrucciones()
{
super(800, 400, 1);
prepare();
}
public void act()
{
if(Greenfoot.isKeyDown("SPACE")||Greenfoot.isKeyDown("ENTER"))
{
Greenfoot.setWorld(new pre1());
}
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
*/
private void prepare()
{
TextoW textoW = new TextoW();
addObject(textoW,61,335);
TextoEnter textoEnter = new TextoEnter();
addObject(textoEnter,689,338);
}
}