Package | verlocity.components |
Class | public final class verEngine |
Inheritance | verEngine Component Singleton Object |
Property | Defined By | ||
---|---|---|---|
className : Object [read-only]
Returns the class name of the component for
dictionary registration. | Component | ||
DT : Number [read-only]
Returns the delta time
| verEngine |
Method | Defined By | ||
---|---|---|---|
verEngine(sStage:Stage)
Constructor of the component. | verEngine | ||
_Destruct():void [override]
Destructor of the component. | verEngine | ||
_IsNotUpdating():Boolean
Returns if the component is not updating (paused). | Component | ||
_IsValid():Boolean
Returns if this singleton is active/valid. | Singleton | ||
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable. | Component | ||
_UpdateComponent():void
Updates the component, if possible. | Component | ||
CurTime():uint
Returns the current time (in miliseconds). | verEngine | ||
Hook(newObj:Object):void
Hooks an object to the game loop. | verEngine | ||
IsPaused():Boolean
Returns if the engine ticks are paused. | verEngine | ||
Pause():void
Pauses the main game loop. | verEngine | ||
RemoveAllHooks():void
Removes all current hooked objects in the engine. | verEngine | ||
Resume():void
Resumes the main game loop. | verEngine | ||
SetTimeScale(nNewTimeScale:Number, bAdjustFramerate:Boolean = false):void
Sets the timescale of the engine. | verEngine | ||
UnHook(objToRemove:Object):void
Removes an object from the engine hook. | verEngine |
Method | Defined By | ||
---|---|---|---|
_Concommands():void [override]
Concommands of the component. | verEngine | ||
_Update():void
Called each engine tick (verEngine), if the component updates
| Component |
DT | property |
DT:Number
[read-only] Returns the delta time
public function get DT():Number
verEngine | () | Constructor |
public function verEngine(sStage:Stage)
Constructor of the component.
ParameterssStage:Stage |
_Concommands | () | method |
override protected function _Concommands():void
Concommands of the component.
_Destruct | () | method |
override public function _Destruct():void
Destructor of the component.
CurTime | () | method |
public final function CurTime():uint
Returns the current time (in miliseconds).
Returnsuint —
|
Hook | () | method |
public final function Hook(newObj:Object):void
Hooks an object to the game loop. It will not add duplicates. Note: Requires a public function named 'Update' in the object.
Parameters
newObj:Object — The object you want to hook into the main game loop.
|
IsPaused | () | method |
public final function IsPaused():Boolean
Returns if the engine ticks are paused.
ReturnsBoolean —
|
Pause | () | method |
public final function Pause():void
Pauses the main game loop.
RemoveAllHooks | () | method |
public final function RemoveAllHooks():void
Removes all current hooked objects in the engine. Very useful for state changes.
Resume | () | method |
public final function Resume():void
Resumes the main game loop.
SetTimeScale | () | method |
public final function SetTimeScale(nNewTimeScale:Number, bAdjustFramerate:Boolean = false):void
Sets the timescale of the engine. Lower than 1 will result in slowed down time.
Parameters
nNewTimeScale:Number — The new timescale to set to (min = 0, max = 5 ).
| |
bAdjustFramerate:Boolean (default = false )
|
UnHook | () | method |
public final function UnHook(objToRemove:Object):void
Removes an object from the engine hook. MAKE SURE TO DO THIS BEFORE YOU REMOVE ANY HOOKED OBJECTS!
Parameters
objToRemove:Object — The object you want to remove from the main game loop.
|