Class: Animation

DKTools.Animation

Animation class

new DKTools.Animation (object)

Name Type Description
object Object object with parameters

Extends

Classes

Action

Members

_actions Array privatereadonly

_id Number | String | * privatereadonly inherited

_manager DKTools.EventsManager privatereadonly inherited

_onFail function | null privatereadonly inherited

_onPause function | null privatereadonly inherited

_onRepeat function | null privatereadonly inherited

_onReset function | null privatereadonly inherited

_onStart function | null privatereadonly inherited

_onSuccess function | null privatereadonly inherited

_onUpdate function | null privatereadonly inherited

_remainingPauseTime Number privatereadonly inherited

_remainingRepeats Number privatereadonly inherited

_remainingTime Number privatereadonly inherited

_repeats Number privatereadonly inherited

_repeatTime Number privatereadonly inherited

_started Boolean privatereadonly inherited

_target DKTools.Sprite | DKTools.Window | * privatereadonly inherited

_type String privatereadonly inherited

actions

Gets actions of the animation
Gets id of the event
Since:
  • 6.0.0

manager inherited

Gets manager of the event

remainingPauseTime inherited overrides

Gets remaining time of pause

remainingRepeats inherited overrides

Remaining amount of repeats

remainingTime inherited overrides

Gets remaining time of current repeat

repeats inherited

Gets amount of repeats

repeatTime inherited

Gets time of one repeat

target inherited

Gets target of the event

type inherited

Gets type of the event

Methods

_callOnFailHandler (data) private inherited

Calls on failure handler
Name Type Description
data * optional Data
Version:
  • 10.0.5

_callOnPauseHandler (data) private inherited

Calls on pause handler
Name Type Description
data * optional Data
Version:
  • 10.0.5

_callOnRepeatHandler (data) private inherited

Calls on repeat handler
Name Type Description
data * optional Data
Version:
  • 10.0.5

_callOnResetHandler (data) private inherited

Calls on reset handler
Name Type Description
data * optional Data
Version:
  • 10.0.5

_callOnStartHandler (data) private inherited

Calls on start handler
Name Type Description
data * optional Data
Version:
  • 10.0.5

_callOnSuccessHandler (forcedSuccess, data) private inherited

Calls on success handler
Name Type Default Description
forcedSuccess Boolean false optional
data * optional Data
Version:
  • 10.0.5

_callOnUpdateHandler (data) private inherited

Calls on update handler
Name Type Description
data * optional Data

_canCallOnFailHandler ()Boolean private inherited

Returns true if can call on failure handler
Returns:
Type Description
Boolean Can call on failure handler

_canCallOnPauseHandler ()Boolean private inherited

Returns true if can call on pause handler
Returns:
Type Description
Boolean Can call on pause handler

_canCallOnRepeatHandler ()Boolean private inherited

Returns true if can call on repeat handler
Returns:
Type Description
Boolean Can call on repeat handler

_canCallOnResetHandler ()Boolean private inherited

Returns true if can call on reset handler
Returns:
Type Description
Boolean Can call on reset handler

_canCallOnStartHandler ()Boolean private inherited

Returns true if can call on start handler
Returns:
Type Description
Boolean Can call on start handler

_canCallOnSuccessHandler ()Boolean private inherited

Returns true if can call on success handler
Returns:
Type Description
Boolean Can call on success handler

_canCallOnUpdateHandler ()Boolean private inherited

Returns true if can call on update handler
Returns:
Type Description
Boolean Can call on update handler

_canUpdateAction ()Boolean private

Returns true if can update the action
Returns:
Type Description
Boolean Can update the action

_clearRemainingRepeats () private inherited

Clears the remaining time of the event repeat

_clearRemainingTime () private inherited

Clears the remaining time of the event repeat

_resetRemainingRepeats () private inherited

Resets the remaining amount of repeats of the event

_resetRemainingTime () private inherited

Resets the remaining time of the event repeat

_update (data) private inherited overrides

Updates the animation
Name Type Description
data * optional Data

_updateAction (action) private

Updates the action
Name Type Description
action DKTools.Animation.Action Action

_updateActions () private

Updates the actions

_updatePause () private inherited

Updates the pause

_updateRemainingPauseTime () private inherited

Updates the remaining pause time

_updateRemainingRepeats () private inherited

Updates the remaining repeats

_updateRemainingTime () private inherited

Updates the remaining time

addAction (action)

Adds the action
Name Type Description
action DKTools.Animation.Action Action

addActions (actions)

Adds the actions
Name Type Description
actions Array.<DKTools.Animation.Action> Actions

fail (data) inherited

Fails the events
Name Type Description
data * optional Data
Since:
  • 10.0.5

finish (forcedSuccess, data) inherited

Finishes the event
Name Type Default Description
forcedSuccess Boolean false optional Forced successful completion of the event
data * optional Data
Version:
  • 10.0.5

getElapsedRepeats ()Number inherited

Returns the elapsed repeats
Returns:
Type Description
Number Elapsed repeats

getElapsedTime ()Number inherited

Returns the elapsed time
Returns:
Type Description
Number Elapsed time

hasAction (action)Boolean

Returns true if the animation has the action
Name Type Description
action DKTools.Animation.Action Action
Returns:
Type Description
Boolean Animation has the action

hasActions ()Boolean

Returns true if the animation has the actions
Returns:
Type Description
Boolean Animation has the actions

hasManager ()Boolean inherited

Returns true if the event has the manager
Since:
  • 5.0.0
Returns:
Type Description
Boolean Event has the manager

hasOnFailHandler ()Boolean inherited

Returns true if the event has the on failure handler
Returns:
Type Description
Boolean Event has the on failure handler

hasOnPauseHandler ()Boolean inherited

Returns true if the event has the on pause handler
Returns:
Type Description
Boolean Event has the on pause handler

hasOnRepeatHandler ()Boolean inherited

Returns true if the event has the on repeat handler
Returns:
Type Description
Boolean Event has the on repeat handler

hasOnResetHandler ()Boolean inherited

Returns true if the event has the on reset handler
Returns:
Type Description
Boolean Event has the on reset handler

hasOnStartHandler ()Boolean inherited

Returns true if the event has the on start handler
Returns:
Type Description
Boolean Event has the on start handler

hasOnSuccessHandler ()Boolean inherited

Returns true if the event has the on success handler
Returns:
Type Description
Boolean Event has the on success handler

hasOnUpdateHandler ()Boolean inherited

Returns true if the event has the on update handler
Returns:
Type Description
Boolean Event has the on update handler

hasTarget ()Boolean inherited

Returns true if the event has the target
Returns:
Type Description
Boolean Event has the target

hasType ()Boolean inherited

Returns true if the event has the type
Returns:
Type Description
Boolean Event has the type

initialize (object) inherited overrides

Initializes the animation
Name Type Description
object DKTools.Animation | Object optional DKTools.Animation or parameters
Version:
  • 6.0.0

isActionFinished (action)Boolean

Returns true if the action is finished
Name Type Description
action DKTools.Animation.Action Action
Returns:
Type Description
Boolean Action is finished

isActionUpdated (action)Boolean

Returns true if the action is updated
Name Type Description
action DKTools.Animation.Action Action
Returns:
Type Description
Boolean Action is updated

isAnimation ()Boolean inherited

Returns true if the event is animation
Returns:
Type Description
Boolean Event is animation

isAnimationAction ()Boolean inherited

Returns true if the event is action of an animation
Returns:
Type Description
Boolean Event is action of an animation

isFinished ()Boolean inherited overrides

Returns true if the animation if finished
Version:
  • 1.1.0
Returns:
Type Description
Boolean Animation if finished

isPaused ()Boolean inherited

Returns true if the event is paused
Returns:
Type Description
Boolean Event is paused

isStarted ()Boolean inherited

Returns true if the event is started
Returns:
Type Description
Boolean Event is started

isUpdated ()Boolean inherited

Returns true if the event is updated
Returns:
Type Description
Boolean Event is updated

pause (duration) inherited

Pauses the event
Name Type Default Description
duration Number -1 optional Duration of pause

remove ()Boolean inherited

Removes the event Returns true if the event was removed
Version:
  • 8.0.0
Returns:
Type Description
Boolean Event was removed

removeAction (action)

Removes the action
Name Type Description
action DKTools.Animation.Action Action

repeat () inherited overrides

Repeats the animation

repeatActions ()

Repeats the actions

reset () inherited overrides

Resets the animation
Version:
  • 1.1.0

resetActions ()

Resets the actions

resume () inherited

Resumes the event

setManager (manager) inherited

Sets the manager
Name Type Description
manager DKTools.EventsManager Manager
Since:
  • 5.0.0

setOnFailHandler (handler) inherited

Sets the on failure handler
Name Type Description
handler function Handler

setOnPauseHandler (handler) inherited

Sets the on pause handler
Name Type Description
handler function Handler

setOnRepeatHandler (handler) inherited

Sets the on repeat handler
Name Type Description
handler function Handler

setOnResetHandler (handler) inherited

Sets the on reset handler
Name Type Description
handler function Handler

setOnStartHandler (handler) inherited

Sets the on start handler
Name Type Description
handler function Handler

setOnSuccessHandler (handler) inherited

Sets the on success handler
Name Type Description
handler function Handler

setOnUpdateHandler (handler) inherited

Sets the on update handler
Name Type Description
handler function Handler

setTarget (target) inherited

Sets the target
Name Type Description
target DKTools.Sprite | DKTools.Window | * Target

stop (forcedSuccess) inherited

Stops the event
Name Type Default Description
forcedSuccess Boolean false optional Forced successful completion of the event

update (data) inherited

Updates the event
Name Type Description
data * optional Data