Packageverlocity.components
Classpublic final class verPause
InheritanceverPause Inheritance Component Inheritance Singleton Inheritance Object

Handles pausing and unpausing. Monitors if the user pressed the hotkey (default 'P') or when the user clicks out of the game. It also provides a customizable pause menu with quick settings.



Public Properties
 PropertyDefined By
 InheritedclassName : Object
[read-only] Returns the class name of the component for dictionary registration.
Component
  MenuDisp : DisplayObject
[read-only] Returns the display object of the pause menu.
verPause
  MenuGUI : PauseMenu
[read-only] Returns the pause menu gui element.
verPause
  MenuList : Vector.<Array>
[read-only] Returns the list of pause menu items.
verPause
Protected Properties
 PropertyDefined By
 Inheritedstage : Stage
Component
Public Methods
 MethodDefined By
  
verPause(sStage:Stage)
Constructor of the component.
verPause
  
_Destruct():void
[override] Destructor of the component.
verPause
 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
  
AddPauseMenuItem(sName:String, fFunction:Function):void
Adds a pause menu item
verPause
  
CanPause():Boolean
Returns if you can actually pause
verPause
  
Clears all pause menu items
verPause
  
Disable():void
Disables pausing
verPause
  
Enable():void
Enables pausing
verPause
  
IsPaused():Boolean
Returns if the engine is paused
verPause
  
IsPauseDisabled():Boolean
Returns if pause was disabled
verPause
  
Pause():void
Pauses everything
verPause
  
RemovePauseMenuItem(sName:String):void
Removes a pause menu item
verPause
  
Resume():void
Resumes everything
verPause
Protected Methods
 MethodDefined By
  
[override] Concommands of the component.
verPause
 Inherited
_Update():void
Called each engine tick (verEngine), if the component updates
Component
Property Detail
MenuDispproperty
MenuDisp:DisplayObject  [read-only]

Returns the display object of the pause menu.


Implementation
    public function get MenuDisp():DisplayObject
MenuGUIproperty 
MenuGUI:PauseMenu  [read-only]

Returns the pause menu gui element.


Implementation
    public function get MenuGUI():PauseMenu
MenuListproperty 
MenuList:Vector.<Array>  [read-only]

Returns the list of pause menu items.


Implementation
    public function get MenuList():Vector.<Array>
Constructor Detail
verPause()Constructor
public function verPause(sStage:Stage)

Constructor of the component.

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

Concommands of the component.

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

Destructor of the component.

AddPauseMenuItem()method 
public final function AddPauseMenuItem(sName:String, fFunction:Function):void

Adds a pause menu item

Parameters

sName:String — Item name
 
fFunction:Function — Function the button preforms

CanPause()method 
public final function CanPause():Boolean

Returns if you can actually pause

Returns
Boolean
ClearPauseMenuItems()method 
public final function ClearPauseMenuItems():void

Clears all pause menu items

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

Disables pausing

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

Enables pausing

IsPaused()method 
public final function IsPaused():Boolean

Returns if the engine is paused

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

Returns if pause was disabled

Returns
Boolean
Pause()method 
public final function Pause():void

Pauses everything

RemovePauseMenuItem()method 
public final function RemovePauseMenuItem(sName:String):void

Removes a pause menu item

Parameters

sName:String — Item name

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

Resumes everything