feat: behavior states (#1918)

This commit is contained in:
David Markowitz
2025-10-19 23:16:36 -07:00
committed by GitHub
parent a70c365c23
commit 0dd504c803
8 changed files with 77 additions and 23 deletions

View File

@@ -1,18 +1,23 @@
#ifndef __PROPERTYBEHAVIOR__H__
#define __PROPERTYBEHAVIOR__H__
#include "BehaviorStates.h"
#include "State.h"
#include <optional>
namespace tinyxml2 {
class XMLElement;
}
enum class BehaviorState : uint32_t;
class AMFArrayValue;
class BehaviorMessageBase;
class ModelComponent;
struct UpdateResult {
std::optional<BehaviorState> newState;
};
/**
* Represents the Entity of a Property Behavior and holds data associated with the behavior
*/
@@ -45,6 +50,7 @@ public:
void OnHit();
private:
State& GetActiveState();
// The current active behavior state. Behaviors can only be in ONE state at a time.
BehaviorState m_ActiveState;