-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathS_HelpState.as
40 lines (36 loc) · 923 Bytes
/
S_HelpState.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
package
{
import flash.display.MovieClip;
public class S_HelpState extends StateMachine
{
private var refToDocClass;
private var backButton;
private var helpBackground;
private var controls
public function S_HelpState(documentClass)
{
refToDocClass = documentClass;
//Create GUI
backButton = new GUIButton(refToDocClass, "ENTER_MENU", new ButtonBack());
backButton.x = 20;
backButton.startX = 20;
backButton.y = 20;
//Create the background image for the menu state
helpBackground = new HelpBackground();
controls = new Controls();
addChild(helpBackground);
addChild(backButton);
addChild(controls);
}
//Update the buttons
override public function update()
{
backButton.update(mouseIsPressed);
}
//Tell the buttons when the gui registered a mouse down event
override public function mousePressed()
{
backButton.mousePressed();
}
}
}