Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Action

!#en Base classAction for action classes. !#zh Action 类是所有动作类型的基类。

Hierarchy

Index

Properties

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

getOriginalTarget

  • getOriginalTarget(): Node | null

getTag

  • getTag(): number

getTarget

  • getTarget(): Node | null

isDone

  • isDone(): boolean
  • !#en return true if the action has finished. !#zh 如果动作已完成就返回 true。

    method

    isDone

    Returns 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

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