ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::unit_role Class Reference

玩家角色单位类 More...

#include <unit.h>

Inheritance diagram for ngl::unit_role:
ngl::unit

Public Member Functions

 unit_role (i64_actorid aunitid)
Public Member Functions inherited from ngl::unit
 unit (i64_actorid aunitid, pbdb::EUNIT atype)
void init (attribute aattribute)
bool set_type (pbdb::EUNIT atype)
 设置单位类型
pbdb::EUNIT type () const
 获取单位类型
attributeget_attribute ()
 获取单位的静态属性容器
bool set_id (i64_actorid aid)
 设置单位ID
i64_actorid id () const
 获取单位ID
dynamic_attributedynamic ()
 获取单位的动态(战斗)属性
void set_x (int32_t ax)
 设置X坐标
void set_y (int32_t ay)
 设置Y坐标
int32_t x () const
 获取X坐标
int32_t y () const
 获取Y坐标
pbdb::POSITION & position ()
 获取位置引用
bool is_position_invalid () const
 检查位置是否无效
void set_angle (int32_t aangle)
 设置单位朝向
int32_t angle () const
 获取单位朝向
void set_speed (int32_t aspeed)
 设置单位移动速度
int32_t speed () const
 获取单位移动速度
void update (int64_t ams)

Detailed Description

玩家角色单位类


The documentation for this class was generated from the following file: