feat(animation): 添加动画状态回调支持

refactor(character): 重构角色动作处理逻辑

feat(swordman): 实现剑士基础攻击和技能1处理

refactor(state): 优化状态机与动作上下文管理

feat(input): 改进输入系统支持动作请求队列

refactor(movement): 重构移动系统支持行走/奔跑模式
This commit is contained in:
2026-04-04 14:45:41 +08:00
parent 1200cf0181
commit 5e80df040b
29 changed files with 1251 additions and 513 deletions

View File

@@ -47,18 +47,17 @@ private:
const char* phase) const;
bool TryStartAction(CharacterObject& owner,
CharacterCommandBuffer& commandBuffer,
CharacterCommandType commandType,
const std::string& requestedActionId,
const std::string& actionId);
bool StartAction(CharacterObject& owner,
const std::string& requestedActionId,
const std::string& actionId);
bool TryStartRegisteredAction(CharacterStateContext& context);
void ApplyFrameEvents(CharacterObject& owner, int previousFrame, int currentFrame);
CharacterStateId currentState_ = CharacterStateId::Idle;
std::string currentActionId_;
const CharacterActionDefinition* currentAction_ = nullptr;
float stateTime_ = 0.0f;
float actionFrameProgress_ = 0.0f;
int actionFrame_ = 0;
float landingTimer_ = 0.0f;
StateRegistry stateRegistry_;
friend class CharacterStateBase;