3#include <Core/Messages/EventMessage.h>
4#include <GameEngine/StateMachine/StateMachineResource.h>
15 const char* GetOldStateName()
const {
return m_sOldStateName; }
16 void SetOldStateName(
const char* szName) { m_sOldStateName.
Assign(szName); }
18 const char* GetNewStateName()
const {
return m_sNewStateName; }
19 void SetNewStateName(
const char* szName) { m_sNewStateName.
Assign(szName); }
44 bool m_bSendMessageOnEnter =
true;
45 bool m_bSendMessageOnExit =
false;
46 bool m_bLogOnEnter =
false;
47 bool m_bLogOnExit =
false;
83 bool m_bDeactivateOthers =
true;
94 virtual void Initialize()
override;
115 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
116 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
119 virtual void OnActivated()
override;
120 virtual void OnDeactivated()
override;
134 const plStateMachineInstance* GetStateMachineInstance()
const {
return m_pStateMachineInstance.Borrow(); }
139 void SetResourceFile(
const char* szFile);
140 const char* GetResourceFile()
const;
144 void SetInitialState(
const char* szName);
145 const char* GetInitialState()
const {
return m_sInitialState; }
156 void SetBlackboardName(
const char* szName);
157 const char* GetBlackboardName()
const {
return m_sBlackboardName; }
162 void InstantiateStateMachine();
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
A message sender that sends all messages to the next component derived from plEventMessageHandlerComp...
Definition EventMessage.h:39
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
void Assign(const char(&string)[N])
Assigning a new string from a string constant is a slow operation, but the hash computation can happe...
A component that holds an plStateMachineInstance using the plStateMachineDescription from the resourc...
Definition StateMachineComponent.h:108
plStateMachineInstance * GetStateMachineInstance()
Returns the plStateMachineInstance owned by this component.
Definition StateMachineComponent.h:133
Definition StateMachineComponent.h:89
The state machine instance represents the actual state machine. Typically it is created from a descri...
Definition StateMachine.h:144
A state machine state that sends a plMsgStateMachineStateChanged on state enter or exit to the owner ...
Definition StateMachineComponent.h:29
A state machine state that sets the enabled flag on a game object and disables all other objects in t...
Definition StateMachineComponent.h:69
Base class for a state in a state machine.
Definition StateMachine.h:20
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
Base class for all messages that are sent as 'events'.
Definition EventMessage.h:8
Message that is sent by plStateMachineState_SendMsg once the state is entered.
Definition StateMachineComponent.h:8
These events may be sent by a specific plResource or by the plResourceManager.
Definition Declarations.h:22
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
Definition WorldModule.h:33