20struct SkillDefinition;
33 static void unregisterCastCondition(
const std::string &
name);
35 static void clearCastConditions();
38 static void learn(
RPGActor *actor,
const std::string &skillId);
40 static bool knows(
RPGActor *actor,
const std::string &skillId);
42 static bool forget(
RPGActor *actor,
const std::string &skillId);
45 static std::string getTargetType(
RPGActor *actor,
const std::string &skillId);
48 static float getCooldownRemaining(
RPGActor *actor,
const std::string &skillId);
50 static void setCooldownRemaining(
RPGActor *actor,
const std::string &skillId,
float seconds);
53 static bool canCast(
RPGActor *actor,
const std::string &skillId, std::string *reason =
nullptr);
61 std::string *reason =
nullptr);
64 static void cancelCast(
RPGActor *actor);
67 static bool isCasting(
RPGActor *actor);
69 static std::string getCastingSkillId(
RPGActor *actor);
71 static float getCastProgress(
RPGActor *actor);
74 static void update(
float dt);
77 static void pollCastEvents(std::vector<SkillCastEvent> &out);
#define EVENGINE_API_PLATFORM
属性 / 状态 / 技能三表合一的 ECS 实体。
EVENGINE_API_PLATFORM public API.
std::function< bool(RPGActor *actor, const SkillDefinition &def, std::string &outReason)> CastCondition
返回 false 表示禁止释放;通过 outReason 说明原因。
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
SettlementPipeline::Stage fn
SkillDefinition public API.