51 static double takeDamage(
RPGActor *actor,
const std::string &
resource,
double amount,
52 const std::string &
source =
"");
54 static double heal(
RPGActor *actor,
const std::string &
resource,
double amount);
66 static void publishSettledChange(
RPGActor *actor,
const std::string &
resource,
67 const std::string &
action,
double amount,
68 const std::string &
source =
"");
70 static void revive(
RPGActor *actor,
const std::string &
resource,
double amount = -1.0);
75 static void pollEvents(std::vector<VitalsEvent> &out);
#define EVENGINE_API_PLATFORM
Move-only, checked operation results for the common layer.
const UnitySourceAsset & source
属性 / 状态 / 技能三表合一的 ECS 实体。
当前资源系统:读写 RPGActor::Vitals 并发出事件。 @thread 调用线程应与 RPGActor 的 ECS 线程一致。
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
生命等资源事件:damage | heal | death | revive。