Plasma Engine  2.0
Loading...
Searching...
No Matches
AudioSwitchStateComponent.h
1#pragma once
2
3#include <AudioSystemPlugin/AudioSystemPluginDLL.h>
4
5#include <AudioSystemPlugin/Components/AudioSystemComponent.h>
6#include <AudioSystemPlugin/Core/AudioSystemData.h>
7#include <AudioSystemPlugin/Core/AudioSystemMessages.h>
8
10
13{
15
16 // plComponent
17
18public:
19 void Initialize() override;
20 void SerializeComponent(plWorldWriter& stream) const override;
21 void DeserializeComponent(plWorldReader& stream) override;
22
23 // plAudioSystemComponent
24
25private:
26 void plAudioSystemComponentIsAbstract() override {}
27
28 // plAudioSwitchStateComponent
29
30public:
33
38 void SetState(const plString& sSwitchStateName, bool bSync = false);
39
42 [[nodiscard]] const plString& GetState() const;
43
46 void OnSetState(plMsgAudioSystemSetSwitchState& msg);
47
48private:
49 plString m_sCurrentSwitchState;
50 plString m_sInitialSwitchState;
51
53};
Component used to set the current state of a switch in the audio middleware.
Definition AudioSwitchStateComponent.h:13
Base class for audio system components that depends on an audio proxy component.
Definition AudioSystemComponent.h:46
void Initialize() override
Can be overridden for basic initialization that depends on a valid hierarchy and position.
Definition AudioSystemComponent.cpp:46
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Definition ComponentManager.h:88
A message sender that sends all messages to the next component derived from plEventMessageHandlerComp...
Definition EventMessage.h:39
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
Definition AudioSystemMessages.h:26