buffs
简介
buff配置维护模块
组件接口
buffs.gs
函数原型 | 函数作用 |
---|---|
void register_buff_info(string buff_id, map buff_info) | 登记buff的一些配置信息 |
void register_effect_mod(string effect_mod, object effect_ob) | 注册可使用的buff特效功能模块对象 |
map get_buff_info(string buff_id) | 根据buff id获取预先登记的buff配置信息 |
object get_effect_ob(string buff_id) | 根据buff id获取buff的特效功能模块对象 |
FBuff.gs
被用于buff的对象继承的组件
函数原型 | 函数作用 |
---|---|
void buff_debug_on(bool enable = true) | 开关调试功能 |
void init_buffs() | 初始化buff列表 |
void heartbeat_buffs() | 定时心跳,轮训处理buff心跳效果,清理过期buff |
map query_buff(string buff_cookie) | 通过cookie查询对应的buff |
array query_cookies(string buff_id) | 通过buff类型,查询该类的所有buff的cookie |
array query_buffs_by_id(string buff_id) | 通过buff类型,查询该类型的所有buff |
bool in_buff(string buff_id) | 判断某个类型的buff是否存在 |
mixed apply_buff(string buff_id, map buff_effect = , float duration = -1f, map buff_source = ) | 添加一个buff |
void clear_buff(string buff_cookie) | 根据cookie清除一个buff |
void clear_buffs_by_id(string buff_id) | 清除一类buff |