Packageverlocity.components
Classpublic final class verStates
InheritanceverStates Inheritance Component Inheritance Singleton Inheritance Object

Manages the current state. States are specific classes that handle each level or gameplay state the game is currently in.



Public Properties
 PropertyDefined By
 InheritedclassName : Object
[read-only] Returns the class name of the component for dictionary registration.
Component
Protected Properties
 PropertyDefined By
 Inheritedstage : Stage
Component
Public Methods
 MethodDefined By
  
verStates(sStage:Stage)
Constructor of the component.
verStates
  
Completely destroys the current state.
verStates
  
_Destruct():void
[override] Destructor of the component.
verStates
 Inherited
_IsNotUpdating():Boolean
Returns if the component is not updating (paused).
Component
 Inherited
_IsValid():Boolean
Returns if this singleton is active/valid.
Singleton
 Inherited
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable.
Component
 Inherited
Updates the component, if possible.
Component
  
EnableTransitions(bEnabled:Boolean = true):void
Sets if transitions should be enabled.
verStates
  
End(bSetNextState:Boolean = true, bTransition:Boolean = true):void
Ends the current state.
verStates
  
GetName():String
Returns the string name of the state.
verStates
  
IsSplashing():Boolean
Returns if we're preforming the splash screen.
verStates
  
IsTransitioning():Boolean
Returns if the is a state transition going on.
verStates
  
Restart(bHardRestart:Boolean = false):void
Restarts the current state.
verStates
  
Set(newState:State, bTransition:Boolean = true):void
Sets the state.
verStates
Protected Methods
 MethodDefined By
  
[override] Concommands of the component.
verStates
  
_Update():void
[override] Updates the current state and handles transitions
verStates
Constructor Detail
verStates()Constructor
public function verStates(sStage:Stage)

Constructor of the component.

Parameters
sStage:Stage
Method Detail
_Concommands()method
override protected function _Concommands():void

Concommands of the component.

_DestroyCurrentState()method 
public final function _DestroyCurrentState():void

Completely destroys the current state.

_Destruct()method 
override public function _Destruct():void

Destructor of the component.

_Update()method 
override protected function _Update():void

Updates the current state and handles transitions

EnableTransitions()method 
public final function EnableTransitions(bEnabled:Boolean = true):void

Sets if transitions should be enabled.

Parameters

bEnabled:Boolean (default = true)

End()method 
public final function End(bSetNextState:Boolean = true, bTransition:Boolean = true):void

Ends the current state.

Parameters

bSetNextState:Boolean (default = true) — Automatically set to the next state? (uses State.NextState)
 
bTransition:Boolean (default = true) — Preform a state transition (VerlocitySettings.STATE_TRANSITION_OUT)

GetName()method 
public final function GetName():String

Returns the string name of the state.

Returns
String
IsSplashing()method 
public final function IsSplashing():Boolean

Returns if we're preforming the splash screen.

Returns
Boolean
IsTransitioning()method 
public final function IsTransitioning():Boolean

Returns if the is a state transition going on.

Returns
Boolean
Restart()method 
public final function Restart(bHardRestart:Boolean = false):void

Restarts the current state.

Parameters

bHardRestart:Boolean (default = false) — Set to call Destruct/Construct instead of DeInit/Init. This will completely destroy and recreate the state.

Set()method 
public final function Set(newState:State, bTransition:Boolean = true):void

Sets the state. Removes current state, if available.

Parameters

newState:State — The new state to set to.
 
bTransition:Boolean (default = true) — Preform a state transition (VerlocitySettings.STATE_TRANSITION_IN)