Constructor
new ScreenOrganizer(game, screenClasses, screenConfigsopt)
Name | Type | Attributes | Description |
---|---|---|---|
game |
CanvasObjectContainer | A reference to the CanvasObjectContainer that is holding the whole game. |
|
screenClasses |
Array | An Array of Classes or Objects that this screen organizer will hold. Other CanvasObjectContainers or CanvasObjects that will act as different screens for the game. |
|
screenConfigs |
Array |
<optional> |
An optional Array of methods to call when each screen is initialized. |
- See:
Members
_aid
_cColor :String
- String
_screens :Array
Holds a reference to each screen.
- Array
_thrott
constructor
coverShape
coverTimer
currentScreen
gameTitleScreen
myEvents
pr
rectRef
transitioning
Methods
addScreenUnderCover(e)
Name | Type | Description |
---|---|---|
e |
changeScreen(toThis)
Change to the screen without removing other screens.
Name | Type | Description |
---|---|---|
toThis |
Number |
getCoverAnimationRate() → {Number}
- Type
- Number
getCoverColor() → {String}
- Type
- String
getGameReference() → {Object}
- Type
- Object
getScreens() → {Array}
- Type
- Array
getTransitionStatus() → {Boolean}
Returns true if a transition is currently happening.
- Type
- Boolean
getWaitForUnderCoverChanges() → {Boolean}
- Type
- Boolean
init(game, screenClasses, screenConfigs)
Acts like a super function.
Name | Type | Description |
---|---|---|
game |
Object | A reference to the CanvasObjectContainer that holds the whole game. |
screenClasses |
Array | An Array of Classes or Objects that will make up the game. If you pass Classes, they will be instantiated. |
screenConfigs |
Array | An optional Array of methods to call when each related class is added |
initializeTransition()
initRemoveCover(e)
Name | Type | Description |
---|---|---|
e |
removeCoverByFadeOut(ts)
Name | Type | Description |
---|---|---|
ts |
setCoverAnimationRate(toThis)
Name | Type | Description |
---|---|---|
toThis |
Number |
setCoverColor(toThis)
Name | Type | Description |
---|---|---|
toThis |
setWaitForUnderCoverChanges(toThis)
If set to true then the transition will wait for any under cover changes to complete before transitioning back.
Name | Type | Description |
---|---|---|
toThis |
Boolean |
showCoverAndKill(ts)
Transitions foward and removes all children from theGame. Used by switchScreen.
Name | Type | Description |
---|---|---|
ts |
showCoverNoKill(ts)
Transition foward without removing screens. Used by changeScreen.
Name | Type | Description |
---|---|---|
ts |
switchScreen(toThis)
Switch to a screen and remove all others.
Name | Type | Description |
---|---|---|
toThis |
transitionBackward() → {Boolean}
Returns true when transition is complete
- Type
- Boolean
transitionForward() → {Boolean}
Returns true when transition is complete
- Type
- Boolean
uncoverDone(e)
Name | Type | Description |
---|---|---|
e |