载入中...
搜索中...
未找到
TraitSystem.h
浏览该文件的文档.
1#pragma once
2
13#include <string>
14#include <vector>
15
16#include "common/Export.h"
17
18namespace eve::rpg {
19
20class RPGActor;
21
27public:
32 static int apply(RPGActor *actor, const std::string &traitId, const std::string &source = "");
34 static bool remove(RPGActor *actor, int instanceId);
36 static int removeBySource(RPGActor *actor, const std::string &source);
38 static int removeByTrait(RPGActor *actor, const std::string &traitId);
40 static void removeAll(RPGActor *actor);
42 static bool hasTrait(RPGActor *actor, const std::string &traitId);
43
45 static int getCount(RPGActor *actor);
47 static int getInstanceIdAt(RPGActor *actor, int index);
49 static std::string getTraitIdAt(RPGActor *actor, int index);
51 static std::string getSourceAt(RPGActor *actor, int index);
52
54 static double getParamRate(RPGActor *actor, const std::string &param);
56 static double getElementRate(RPGActor *actor, const std::string &element);
58 static double getStateRate(RPGActor *actor, const std::string &stateId);
60 static bool isStateResist(RPGActor *actor, const std::string &stateId);
62 static double getExParam(RPGActor *actor, const std::string &exParam);
63
65 static std::vector<std::string> getAttackElements(RPGActor *actor);
67 static std::vector<std::string> getAttackStates(RPGActor *actor);
69 static double getAttackSpeed(RPGActor *actor);
71 static int getAttackTimesAdd(RPGActor *actor);
72};
73
74} // namespace eve::rpg
#define EVENGINE_API_PLATFORM
Definition Export.h:107
std::string element
uint32_t index
const UnitySourceAsset & source
属性 / 状态 / 技能三表合一的 ECS 实体。
Definition RPGActor.h:34
特征系统。 @thread 调用线程应与 RPGActor 的 ECS 线程一致。
Definition TraitSystem.h:26
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。