entity
简介
实体工厂
组件接口
FEntityBase.gs
实体组件基类
函数原型 | 函数作用 |
---|---|
string get_rid() | 获取RID |
void set_rid(string rid) | 设置RID |
string get_name() | 获取名称 |
void set_name(string name) | 设置名称 |
int get_class_id() | 获取配置ID |
void set_class_id(int class_id) | 设置配置ID |
bool is_comm() | 是否可以网络通信 |
void set_comm(bool is_comm) | 设置网络通信 |
bool is_cast() | 是否可以广播 |
void set_cast(bool is_cast) | 设置广播 |
bool is_inner() | 是否是内部对象 |
void set_inner(bool is_inner) | 设置内部对象 |
string pure_name() | 获取对象脚本名称 |
void sync_field(string d, mixed key, mixed val) | 同步字段 |
void send(string cmd, ...) | 发送消息 |
void send_ex(string cmd, ...) | 发送消息扩展 |
void set_comm_ob(object comm_ob) | 设置绑定通信对象 |
void send_alone(string cmd, ...) | 通过通信对象发送 |
void send_to_me(string cmd, ...) | 发送给自己 |
void send_to_server(string cmd, ...) | 发送给所在游戏服 |
map get_info() | 获取实体信息 |
string desc() | 获取实体描述 |
void sync_data() | 同步所有节点的数据到客户端 |
EntityD.gs
默认实体工厂
函数原型 | 函数作用 |
---|---|
object create_entity_by_class_id(mixed class_id_or_alias, map param, domain d) | 根据配置创建实体对象 |
object create_entity(string ob_name, map param, domain d) | 创建实体对象 |