entity_base
简介
提供服务端/客户端通用的实体entity配置加载功能以及一些扩展接口
一些说明:
entity_base里不应该存放任何成员变量,以避免同时使用entity_base对象和通过component entity_base时导致的成员变量数据存在两份的问题
相关的.xlsx配置文件需要放在根目录的/etc/下
组件接口
EntityBaseCommon.gs
存放一些公共数据,用于解决同时直接component entity_base和直接使用entity_base导致的公共数据存在两份的问题
函数原型 | 函数作用 |
---|---|
void set_impl_ob(object impl_ob) | 设置实际执行功能的对象 |
object get_impl_ob() | 获取当前实际执行功能的对象 |
void append_entity_xlsx(array entity_xlsx_list, bool refresh_at_once = false) | 加载额外的类似entity.xlsx的实体集合配置表 |
void append_entity_container_xlsx(array entity_container_xlsx_list, bool refresh_at_once = false) | 加载额外的类似entity_container.xlsx的实体初始容器设置配置表 |
void on_entity_reload(string entity_type, function func, string name = nil) | 响应指定类型的实体信息变更事件 |
EntityBaseDefaultImpl.gs
默认实现 - 预加载文件到内存