SceneAnimation

SceneAnimation

new SceneAnimation(node, data)

场景动画对象

Source:
Parameters:
Name Type Description
node Object

场景中预设的动画数据

data AnimFile

动画文件数据

Members

events :Object

场景动画事件映射表

Source:
Type:

name :string

场景动画名称

Source:
Type:
  • string

presetId :string

场景动画预设数据ID

Source:
Type:
  • string

script :Script

场景动画脚本管理器

Source:
Type:

selfVarId :string

场景动画独立变量ID

Source:
Type:
  • string

started :boolean

已开始状态

Source:
Type:
  • boolean

updaters :ModuleList

场景动画的更新器模块列表

Source:
Type:

x :number

场景动画水平位置

Source:
Type:
  • number

y :number

场景动画垂直位置

Source:
Type:
  • number

Methods

callEvent(type) → {EventHandler|undefined}

调用场景动画事件

Source:
Parameters:
Name Type Description
type string

场景动画事件类型

Returns:
Type:
EventHandler | undefined

destroy()

销毁场景动画

Source:

emit(type)

调用场景动画事件和脚本

Source:
Parameters:
Name Type Description
type string

场景动画事件类型

saveData()

保存场景动画数据

Source:

update(deltaTime)

更新场景动画

Source:
Parameters:
Name Type Description
deltaTime number

增量时间(毫秒)