-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuState.as
More file actions
41 lines (31 loc) · 770 Bytes
/
MenuState.as
File metadata and controls
41 lines (31 loc) · 770 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
37
38
39
40
41
package
{
import org.flixel.*;
public class MenuState extends FlxState
{
public function MenuState()
{
super();
}
override public function create():void
{
FlxG.playMusic(GameAssets.Music);
var title:FlxText;
title = new FlxText(0, 16, FlxG.width, "What Do");
title.setFormat (null, 16, 0xFFFFFFFF, "center");
add(title);
var instructions:FlxText;
instructions = new FlxText(0, FlxG.height - 32, FlxG.width, "Press Space To Play");
instructions.setFormat (null, 8, 0xFFFFFFFF, "center");
add(instructions);
}
override public function update():void
{
super.update();
if (FlxG.keys.justPressed("SPACE"))
{
WhatDo.goToFirstLevel();
}
}
}
}