#ifndef STATE_HPP #define STATE_HPP #include #include #include template struct Transition { const std::string from; const std::string target_state; const std::function condition; }; template class State { public: virtual ~State() = default; virtual void OnEnter(OwnerType &owner) = 0; virtual void OnUpdate(OwnerType &owner) = 0; virtual void OnExit(OwnerType &owner) = 0; virtual std::string Id() const = 0; }; template class AState : public State { public: AState(const std::string &id) : entity_id(id) {}; std::string Id() const override { return entity_id; } private: std::string entity_id; }; #endif // STATE_HPP