3#include <AudioSystemPlugin/AudioSystemPluginDLL.h>
5#include <AudioSystemPlugin/Core/AudioSystemData.h>
6#include <AudioSystemPlugin/Core/AudioSystemMessages.h>
8#include <Core/World/Component.h>
9#include <Core/World/World.h>
41 virtual void plAudioSystemComponentIsAbstract() = 0;
60 [[nodiscard]] plAudioSystemDataID GetEntityId()
const;
84 [[nodiscard]] plAudioSystemDataID GetEnvironmentId()
const;
88 [[nodiscard]]
virtual float GetMaxDistance()
const;
92 virtual void SetMaxDistance(
float fFadeDistance);
96 void OverrideEnvironmentAmount(
float fValue);
101 float m_fMaxDistance;
105 bool m_bOverrideValue;
106 float m_fOverrideValue;
119 UpdateFunctionName(functionName);
122 desc.m_bOnlyUpdateWhenSimulating =
true;
123 desc.m_Phase = plWorldModule::UpdateFunctionDesc::Phase::PostTransform;
125 this->RegisterUpdateFunction(desc);
131 for (
auto it = this->m_ComponentStorage.GetIterator(context.m_uiFirstComponentIndex, context.m_uiComponentCount); it.IsValid(); ++it)
133 if (T* pComponent = it; pComponent->IsActiveAndInitialized())
135 pComponent->Update();
145 const char* szEnd = sName.FindSubString(
",");
147 if (szEnd !=
nullptr && sName.StartsWith(
"plAudioSystemComponentManager<class "))
151 PL_ASSERT_DEV(!sChoppedName.IsEmpty(),
"Chopped name is empty: '{0}'", sName);
153 out_sName = sChoppedName;
154 out_sName.
Append(
"::Update");
Component that represent an audio entity in the scene graph.
Definition AudioProxyComponent.h:30
Base class for audio system components.
Definition AudioSystemComponent.h:34
Base class for audio system component manager which need to update their states (eg....
Definition AudioSystemComponent.h:14
void Initialize() override
This method is called after the constructor. A derived type can override this method to do initializa...
Definition AudioSystemComponent.h:116
Base class for audio system environment components.
Definition AudioSystemComponent.h:67
virtual float GetEnvironmentAmount(plAudioProxyComponent *pProxyComponent) const =0
Gets the environment amount for the specified audio proxy component.
Base class for audio system components that depends on an audio proxy component.
Definition AudioSystemComponent.h:46
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Base class of all component types.
Definition Component.h:25
virtual void OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void Deinitialize()
This method is called before the component is destroyed. A derived type can override this method to d...
Definition Component.cpp:133
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
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
void Append(plUInt32 uiChar)
Appends a single Utf32 character.
Definition StringBuilder_inl.h:94
static constexpr plUInt32 GetStringElementCount(const T *pString)
Returns the number of elements of type T that the string contains, until it hits an element that is z...
Definition StringUtils_inl.h:45
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition BlockStorage.h:7
Definition AudioSystemMessages.h:41
Definition WorldModule.h:33
Description of an update function that can be registered at the world.
Definition WorldModule.h:43