3#include <Core/Scripting/ScriptClassResource.h>
4#include <Core/World/EventMessageHandlerComponent.h>
5#include <Foundation/Types/RangeView.h>
37 void SetScriptClassFile(
const char* szFile);
38 const char* GetScriptClassFile()
const;
40 void SetUpdateInterval(
plTime interval);
41 plTime GetUpdateInterval()
const;
46 void SetParameter(
const char* szKey,
const plVariant& value);
47 void RemoveParameter(
const char* szKey);
48 bool GetParameter(
const char* szKey,
plVariant& out_value)
const;
50 PL_ALWAYS_INLINE
plScriptInstance* GetScriptInstance() {
return m_pInstance.Borrow(); }
53 void InstantiateScript(
bool bActivate);
54 void ClearInstance(
bool bDeactivate);
55 void AddUpdateFunctionToSchedule();
56 void RemoveUpdateFunctionToSchedule();
59 void CallScriptFunction(plUInt32 uiFunctionIndex);
The base class for a property that represents a function.
Definition AbstractProperty.h:535
See plArrayMapBase for details.
Definition ArrayMap.h:149
virtual void OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void OnSimulationStarted()
This method is called once for active components, at the start of the next world update,...
Definition Component.cpp:144
virtual void Initialize()
Can be overridden for basic initialization that depends on a valid hierarchy and position.
Definition Component.cpp:131
virtual void OnActivated()
This method is called when the component gets activated.
Definition Component.cpp:140
Definition ComponentManager.h:88
Base class for components that want to handle 'event messages'.
Definition EventMessageHandlerComponent.h:14
virtual void SerializeComponent(plWorldWriter &inout_stream) const override
Override this to save the current state of the component to the given stream.
Definition EventMessageHandlerComponent.cpp:56
virtual void DeserializeComponent(plWorldReader &inout_stream) override
Override this to load the current state of the component from the given stream.
Definition EventMessageHandlerComponent.cpp:68
virtual void Deinitialize() override
This method is called before the component is destroyed. A derived type can override this method to d...
Definition EventMessageHandlerComponent.cpp:88
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
This class uses delegates to define a range of values that can be enumerated using a forward iterator...
Definition RangeView.h:24
Definition ScriptComponent.h:10
Definition ScriptRTTI.h:66
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
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
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
PL_ALWAYS_INLINE static constexpr plTime MakeZero()
Creates an instance of plTime that was initialized with zero.
Definition Time.h:42