Class Index | File Index

Classes


Class lime.Director


Extends lime.Node.

Defined in: director.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
lime.Director(parentElement, opt_width, opt_height)
Director object.
Field Summary
Field Attributes Field Name and Description
<private>  
Array of CoverNode instances.
<static>  
lime.Director.DEFAULT_HEIGHT
Default height of the Director
<static>  
lime.Director.DEFAULT_WIDTH
Default width of the Director
<static>  
lime.Director.FPS_INTERVAL
Milliseconds between recalculating FPS value
<private>  
Array of Scene instances.
Fields borrowed from class lime.Node:
customEvent_, eventHandlers_, inTree_, supportedRenderers, transitionsAdd_, transitionsClear_
Method Summary
Method Attributes Method Name and Description
 
addCover(cover, opt_addAboveDirector)
Add CoverNode object to the viewport
 
getBounds(box)
Return bounds of director,
 
Get current active scene
 
 
 
<private>  
Update dimensions based on viewport dimension changes
 
Returns true if FPS counter is displayed
 
Returns true if director is paused? On paused state the update timer doesn't fire.
<private>  
 
 
Add support for adding game to Springboard as a web application on iOS devices
 
Remove current scene from the stack
 
pushScene(scene)
Push scene to the top of scene stack
 
removeCover(cover)
Remove CoverNode object from the viewport
 
replaceScene(scene, opt_transition, opt_duration)
Replace current scene with new scene
 
 
Show or hide FPS counter
 
setPaused(value)
Pauses or resumes the director
<private>  
step_(delta)
Timeline function.
 
<private>  
Updates the cached value of directors parentelement position in the viewport
 
Methods borrowed from class lime.Node:
addDependency, addEventListener, addTransition, appendChild, calcRelativeQuality, clearTransition, createDomElement, getAnchorPoint, getAutoResize, getBoundingBox, getChildAt, getChildIndex, getDeepestDomElement, getDeepestParentWithDom, getDirty, getFrame, getHidden, getMask, getNumberOfChildren, getOpacity, getParent, getParentStack_, getPosition, getQuality, getRelativeQuality, getRotation, getScale, getSize, localToNode, localToParent, measureContents, needsDomElement, parentToLocal, releaseDependencies, removeAllChildren, removeChild, removeChildAt, removeDependency, removeDomElement, removeEventListener, runAction, setAnchorPoint, setAutoResize, setChildIndex, setDirty, setHidden, setMask, setOpacity, setPosition, setQuality, setRenderer, setRotation, setScale, setSize, setupDependencies, updateDomElement, wasAddedToTree, wasRemovedFromTree
Class Detail
lime.Director(parentElement, opt_width, opt_height)
Director object. Base object for every game.
Parameters:
{Element} parentElement
Parent element for director.
{number=} opt_width
Optionaly define what height and width the director should have.
{number=} opt_height
Optionaly define what height and width the director should have.
Field Detail
<private> coverStack_
Array of CoverNode instances.

<static> lime.Director.DEFAULT_HEIGHT
Default height of the Director

<static> lime.Director.DEFAULT_WIDTH
Default width of the Director

<static> lime.Director.FPS_INTERVAL
Milliseconds between recalculating FPS value

<private> sceneStack_
Array of Scene instances. Last one is the active scene.
Method Detail
addCover(cover, opt_addAboveDirector)
Add CoverNode object to the viewport
Parameters:
{lime.CoverNode} cover
Covernode.
{boolean} opt_addAboveDirector
Cover is added above director object.

{goog.math.Box} getBounds(box)
Return bounds of director,
Parameters:
{goog.math.Box} box
Edges.
Returns:
{goog.math.Box} new bounds.

{lime.Scene} getCurrentScene()
Get current active scene
Returns:
{lime.Scene} Currently active scene.

getDirector()

getScene()

hitTest(e)
Parameters:
e

<private> invalidateSize_()
Update dimensions based on viewport dimension changes

{boolean} isDisplayFPS()
Returns true if FPS counter is displayed
Returns:
{boolean} FPS is displayed.

{boolean} isPaused()
Returns true if director is paused? On paused state the update timer doesn't fire.
Returns:
{boolean} If director is paused.

<private> keyUpHandler_(e)
Parameters:
e

localToScreen(c)
Parameters:
c

makeMobileWebAppCapable()
Add support for adding game to Springboard as a web application on iOS devices

popScene()
Remove current scene from the stack

pushScene(scene)
Push scene to the top of scene stack
Parameters:
{lime.Scene} scene
New scene.

removeCover(cover)
Remove CoverNode object from the viewport
Parameters:
{lime.CoverNode} cover
Cover to remove.

replaceScene(scene, opt_transition, opt_duration)
Replace current scene with new scene
Parameters:
{lime.Scene} scene
New scene.
{function(lime.Scene|lime.Scene|boolean=)=} opt_transition
Transition played.
{number=} opt_duration
Duration of transition.

screenToLocal(c)
Parameters:
c

{lime.Director} setDisplayFPS(value)
Show or hide FPS counter
Parameters:
{boolean} value
Display FPS?
Returns:
{lime.Director} The director object itself.

{lime.Director} setPaused(value)
Pauses or resumes the director
Parameters:
{boolean} value
Pause or resume.
Returns:
{lime.Director} The director object itself.

<private> step_(delta)
Timeline function.
Parameters:
{number} delta
Milliseconds since last step.

update()

<private> updateDomOffset_()
Updates the cached value of directors parentelement position in the viewport

updateLayout()

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 30 2011 11:27:22 GMT+0300 (EEST)