建档
This commit is contained in:
22
source_game/Asset/Character/Chr_StateMachine.h
Normal file
22
source_game/Asset/Character/Chr_StateMachine.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "EngineFrame/Component/Component.h"
|
||||
#include "Global/Global_Enum.h"
|
||||
|
||||
class CharacterObject;
|
||||
class Chr_StateMachine : public Component
|
||||
{
|
||||
private:
|
||||
// 父对象
|
||||
CharacterObject *chr_Parent;
|
||||
// 状态
|
||||
int State = -1;
|
||||
// 状态时间
|
||||
int StateTime = 0;
|
||||
|
||||
public:
|
||||
void Init(CharacterObject *parent);
|
||||
void ChangeState(int state);
|
||||
int GetState() { return State; };
|
||||
|
||||
void Update(float deltaTime);
|
||||
};
|
||||
Reference in New Issue
Block a user