SceneRegion

SceneRegion

new SceneRegion(data)

场景区域对象

Source:
Parameters:
Name Type Description
data Object

场景中预设的区域数据

Members

actors :Array.<Actor>

场景区域中已进入角色列表

Source:
Type:

events :Object

场景区域事件映射表

Source:
Type:

name :string

场景区域名称

Source:
Type:
  • string

parent :SceneRegionList|null

场景区域的父级对象

Source:
Type:

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, triggerActoropt) → {EventHandler|undefined}

调用区域事件

Source:
Parameters:
Name Type Attributes Description
type string

区域事件类型

triggerActor Actor <optional>

事件触发角色

Returns:
Type:
EventHandler | undefined

createEventUpdaters()

创建区域事件更新器

Source:

destroy()

销毁场景区域

Source:

emit(type, triggerActoropt)

调用区域事件和脚本

Source:
Parameters:
Name Type Attributes Description
type string

区域事件类型

triggerActor Actor <optional>

事件触发角色

saveData()

保存区域数据

Source:

update(deltaTime)

更新场景区域

Source:
Parameters:
Name Type Description
deltaTime number

增量时间(毫秒)