新增通用状态类和职业专属状态类,将状态逻辑从状态机中解耦 添加状态注册机制,支持按职业配置状态 实现基础状态如待机、移动、跳跃、受击等 为剑士职业实现专属攻击状态 补充状态机开发说明文档
19 lines
447 B
C++
19 lines
447 B
C++
#pragma once
|
|
|
|
#include "character/states/CharacterStateBase.h"
|
|
|
|
namespace frostbite2D {
|
|
|
|
class MoveState : public CharacterStateBase {
|
|
public:
|
|
MoveState();
|
|
|
|
void OnEnter(CharacterStateMachine& machine,
|
|
CharacterStateContext& context,
|
|
CharacterStateId previousState) override;
|
|
void OnUpdate(CharacterStateMachine& machine,
|
|
CharacterStateContext& context) override;
|
|
};
|
|
|
|
} // namespace frostbite2D
|