NWengine 0.9
Loading...
Searching...
No Matches
AudioListener Class Reference

Represents an audio listener component attached to a game object. More...

#include <AudioListener.h>

Inheritance diagram for AudioListener:
GameComponent Serialized

Public Member Functions

 AudioListener ()
 Default constructor for the AudioListener class.
 
 ~AudioListener ()
 Destructor for the AudioListener class.
 
 AudioListener (GameObject *attachedObj)
 Constructor for the AudioListener class.
 
void Update () override
 Updates the audio listener component.
 
int Serialize (std::fstream *data, int offset) override
 Serializes the audio listener component data.
 
int Deserialize (std::fstream *data, int offset) override
 Deserializes the audio listener component data.
 
- Public Member Functions inherited from GameComponent
virtual void Start ()
 Start the game component.
 
virtual void SetGameObject (void *go)
 Set the GameObject associated with the game component.
 
virtual voidGetGameObject ()
 Get the GameObject associated with the game component.
 
virtual ~GameComponent ()
 Destructor for the game component.
 
- Public Member Functions inherited from Serialized
 Serialized ()
 Default constructor for Serialized class.
 

Static Public Member Functions

static std::string GetType ()
 Gets the type of the audio listener component.
 
- Static Public Member Functions inherited from GameComponent
static std::string GetType ()
 Get the type of the game component.
 

Public Attributes

GameObjectattachedObj = nullptr
 The game object that the audio listener is attached to.
 

Static Public Attributes

static std::map< GameObject *, AudioListener * > componentList
 A map of game objects to their corresponding audio listener components.
 

Detailed Description

Represents an audio listener component attached to a game object.

Represents an audio listener component that can be attached to a game object.

Constructor & Destructor Documentation

◆ AudioListener()

AudioListener::AudioListener ( GameObject * attachedObj)

Constructor for the AudioListener class.

Parameters
attachedObjThe game object to attach the audio listener to.

Member Function Documentation

◆ Deserialize()

int AudioListener::Deserialize ( std::fstream * data,
int offset )
overridevirtual

Deserializes the audio listener component data.

Parameters
dataThe file stream to read the serialized data from.
offsetThe offset in the file stream to start reading the serialized data.
Returns
The number of bytes read from the file stream.

Reimplemented from Serialized.

◆ GetType()

static std::string AudioListener::GetType ( )
inlinestatic

Gets the type of the audio listener component.

Returns
The type of the audio listener component.

◆ Serialize()

int AudioListener::Serialize ( std::fstream * data,
int offset )
overridevirtual

Serializes the audio listener component data.

Parameters
dataThe file stream to write the serialized data to.
offsetThe offset in the file stream to start writing the serialized data.
Returns
The number of bytes written to the file stream.

Reimplemented from Serialized.

◆ Update()

void AudioListener::Update ( )
overridevirtual

Updates the audio listener component.

Reimplemented from GameComponent.


The documentation for this class was generated from the following files: