Class Three
All Implemented Interfaces:
Serializable, MovieClip
Author:
Jack Wootton
public class Three
extends foo implements Serializable, MovieClip
A factory class for the game itself . This class deals with all decisions and rendering for the game .
Primarily it allocates control between smaller more specific classes that make up the game .
It also initliases all resources required for game-play and in-game menus .
Void
func1(w:Number, h:Number)
public Three()
Empty constructor since initialisation is performed by initGame .
Parameters:
public static age5 : void
public static age4 : void
public static age2 : Number
public static age1 : Number
public func1(w:Number, h:Number):Void
Used to set all data members to their default values . Specifically display dimensions are used to further initialise other classes such as Player , TheOthers , WeaponsShop , World , TaskHut , Onventorym Inn , Stats , GraphicalTimer and all data required to play Island Adventure .
Parameters:
w - Width of the hardware device ' s deisplay
h - Height of the hardware device ' s display
Returns:
Void -
See also:
AnotherClass1
AnotherClass2
AnotherClass3
public setTimer(b:boolean):Void
Used to start and stop the graphical game timer when a task is accepted .
Parameters:
b - boolean value representing start ( the timer ) and stop ( the timer )
Returns:
Void -
See also:
public static processKey(keyCode:Number, GameActionKey:Number):boolean
Called by other classes to triger appropriate actions when key is pressed on the devices keypad . Flags are checked to see what is current displayed on the device e . g . it may be the World , TaskHut or OptionsScreen , etc etc . A simple if / else structure is used to pass the keyPressed event to the appropriate class to deal with .
Parameters:
keyCode - Integer value representing the pressed key
GameActionKey - Integer value representing game action associated with more than one key
Returns:
boolean -
See also:
public onMouseClick(void):void
Parameters:
void -
Returns:
void -
See also:
public onKeyPress():void
Parameters:
Returns:
void -
See also: