Class: Scene

DKTools.Scene

new DKTools.Scene ()

Extends

Classes

Preloader

Members

_eventsManager DKTools.EventsManager privatereadonly

Methods

addAnimation (animation)

Adds the animation
Name Type Description
animation DKTools.Animation Animation to add

addEvent (object)DKTools.Event

Adds the event
Name Type Description
object DKTools.Event | Object Event or object with parameters for the event
Name Type Description
type String optional Type of the event
repeatTime Number optional Time of one repeat
repeats Number optional Amount of repeats
remainingPauseTime Number optional Remaining time of pause
onStart function optional Handler of the event start
onUpdate function optional Handler of the event update
onPause function optional Handler of the event pause
onReset function optional Handler of the event reset
onRepeat function optional Handler of the event repeat
onSuccess function optional Handler of the event success
onFail function optional Handler of the event fail
Returns:
Type Description
DKTools.Event Added event

addOneTimeEvent (object)DKTools.Event

Adds the one time event
Name Type Description
object DKTools.Event | Object Event or object with parameters for the event
Name Type Description
type String optional Type of the event
remainingPauseTime Number optional Remaining time of pause
onStart function optional Handler of the event start
onUpdate function optional Handler of the event update
onPause function optional Handler of the event pause
onReset function optional Handler of the event reset
onRepeat function optional Handler of the event repeat
onSuccess function optional Handler of the event success
onFail function optional Handler of the event fail
Returns:
Type Description
DKTools.Event Added event

arePageButtonsEnabled ()Boolean

Returns true if the page buttons enabled
Since:
  • 1.2.4
Returns:
Type Description
Boolean Page buttons enabled

create ()

Creates all
Version:
  • 1.2.4

createAllSprites ()

Creates all sprites

createAllWindows ()

Creates all windows

createBackground ()

Creates the background
Version:
  • 1.2.4

createCancelButton ()

Creates the cancel button

createForeground ()

Creates the foreground

createHelpWindow (windowClass)

Creates the help window
Name Type Default Description
windowClass function Window_Help optional Window class
Since:
  • 1.2.4

createPageButtons ()

Creates the page buttons

createUI ()

Creates the mobile UI

hasWindowLayer ()Boolean

Returns true if the scene has the layer of windows
Returns:
Type Description
Boolean Scene has the layer of windows

initialize ()

Initializes a class object

isChild (object)Boolean

Returns true if the object (parameter) is child of scene
Name Type Description
object Sprite | Window Object
Returns:
Type Description
Boolean Object (parameter) is child of scene

isPreloaded ()Boolean inherited

Returns true if the scene is preloaded
Returns:
Type Description
Boolean Scene is preloaded

needsBackground ()Boolean

Returns true if needs create the background
Since:
  • 1.2.4
Returns:
Type Description
Boolean Needs create the background

needsCancelButton ()Boolean

Returns true if needs create the cancel button
Returns:
Type Description
Boolean Needs create the cancel button

needsPageButtons ()Boolean

Returns true if needs create the page buttons
Returns:
Type Description
Boolean Needs create the page buttons

removeWindow (window)Boolean

Removes the window from the scene Returns true if the window is removed
Name Type Description
window DKTools.Window | * Window to remove
Returns:
Type Description
Boolean Window is removed

setBackgroundOpacity (opacity)

Sets the background opacity
Name Type Description
opacity Number Opacity
Since:
  • 1.2.4

setupPreloading () inherited

Setups for the preloading
Example
var bitmap = ImageManager.loadSystem('Window')

this._preloader.add(bitmap);

startPreloading () inherited

Starts the preloading

update ()

Updates the scene
Version:
  • 1.2.4

updateEvents ()

Updates the events

updatePageButtons ()

Updates page buttons
Since:
  • 1.2.4

updateQueueEvents ()

Updates the events with type: queue

updateReadyEvents ()

Updates the events with type: ready

updateUpdateEvents ()

Updates the events with type: update