-
Notifications
You must be signed in to change notification settings - Fork 0
/
IntroWorld.as
42 lines (38 loc) · 990 Bytes
/
IntroWorld.as
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
42
package {
import net.flashpunk.World;
import flash.geom.Point;
import net.flashpunk.graphics.Text;
import net.flashpunk.Entity;
import net.flashpunk.utils.Input;
import net.flashpunk.utils.Key;
import net.flashpunk.FP;
/**
* @author jamescarpenter
*/
public class IntroWorld extends World
{
private var waited:Boolean = false;
public function IntroWorld()
{
}
override public function begin():void
{
var statusentity:Entity = new Entity();
var statusstring:Text = new Text("Those handbags contain money,\nyou wan't it!\nNick those handbags by spinning\nand hitting the old dears with\nyour swag bag.\nCareful you don't get too dizzy...\nor they'll get you!\n");
statusentity.graphic = statusstring;
add(statusentity);
FP.alarm(2, timeout);
}
override public function update():void
{
if(Input.check(Key.SPACE) && waited)
{
FP.world = new GameWorld();
}
}
public function timeout() :void
{
waited = true;
}
}
}