SkillManager

SkillManager

new SkillManager(actor)

角色技能管理器

Source:
Parameters:
Name Type Description
actor Actor

绑定的角色对象

Members

actor :Actor

绑定的角色对象

Source:
Type:

cooldownList :CooldownList

技能冷却列表

Source:
Type:
  • CooldownList

idMap :Object

技能ID映射表

Source:
Type:

version :number

技能管理器版本(随着技能添加和移除发生变化)

Source:
Type:
  • number

Methods

add(skill)

添加角色技能

Source:
Parameters:
Name Type Description
skill Skill

技能实例

delete(id)

删除角色技能

Source:
Parameters:
Name Type Description
id string

技能文件ID

get(id) → {Skill|undefined}

获取角色技能

Source:
Parameters:
Name Type Description
id string

技能文件ID

Returns:
Type:
Skill | undefined

loadData(skills)

加载技能列表数据

Source:
Parameters:
Name Type Description
skills Array.<Object>

remove(skill)

移除角色技能

Source:
Parameters:
Name Type Description
skill Skill

技能实例

saveData()

保存技能列表数据

Source:

sort()

自动排序技能列表

Source: