Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FiniteTimeAction

!#en Base class actions that do have a finite time duration.
Possible actions:

  • An action with a duration of 0 seconds.
  • An action with a duration of 35.5 seconds.

Infinite time actions are valid !#zh 有限时间动作,这种动作拥有时长 duration 属性。

Hierarchy

Index

Properties

_duration

_duration: number = 0

_timesForRepeat

_timesForRepeat: number = 1

Protected originalTarget

originalTarget: Node | null = null

Protected tag

tag: number = Action.TAG_INVALID

Protected target

target: Node | null = null

Static TAG_INVALID

TAG_INVALID: number = -1

!#en Default Action tag. !#zh 默认动作标签。

constant
static
default

-1

Methods

clone

getDuration

  • getDuration(): number
  • !#en get duration of the action. (seconds). !#zh 获取动作以秒为单位的持续时间。

    method

    getDuration

    Returns number

getOriginalTarget

  • getOriginalTarget(): Node | null

getTag

  • getTag(): number

getTarget

  • getTarget(): Node | null

isDone

  • isDone(): boolean

release

  • release(): void

retain

  • retain(): void

reverse

  • !#en Returns a reversed action.
    For example:

    • The action will be x coordinates of 0 move to 100.
    • The reversed action will be x of 100 move to 0.
    • Will be rewritten !#zh 返回一个新的动作,执行与原动作完全相反的动作。
    method

    reverse

    Returns Action | null

setDuration

  • setDuration(duration: number): void
  • !#en set duration of the action. (seconds). !#zh 设置动作以秒为单位的持续时间。

    method

    setDuration

    Parameters

    • duration: number

    Returns void

setOriginalTarget

  • setOriginalTarget(originalTarget: any): void

setTag

  • setTag(tag: number): void

setTarget

  • setTarget(target: Node): void

startWithTarget

  • startWithTarget(target: any): void

step

  • step(dt: number): void

stop

  • stop(): void

update

  • update(dt: number): void

Generated using TypeDoc