| 
    NWengine 0.9
    
   | 
 
The AudioEmitter class represents a component that emits audio in a game object. More...
#include <AudioEmitter.h>
  
Public Member Functions | |
| AudioEmitter () | |
| AudioEmitter constructor.  | |
| AudioEmitter (GameObject *attachedObj) | |
| AudioEmitter constructor with attached game object.   | |
| ~AudioEmitter () | |
| AudioEmitter destructor.  | |
| void | SetSound (const std::string &path) | 
| SetSound sets the sound path for the AudioEmitter.   | |
| void | SetSound (const Sound *snd) | 
| SetSound sets the sound for the AudioEmitter.   | |
| int | Serialize (std::fstream *data, int offset) override | 
| Serialize serializes the AudioEmitter data.   | |
| int | Deserialize (std::fstream *data, int offset) override | 
| Deserialize deserializes the AudioEmitter data.   | |
  Public Member Functions inherited from GameComponent | |
| virtual void | Update () | 
| Update the game component.   | |
| virtual void | Start () | 
| Start the game component.   | |
| virtual void | SetGameObject (void *go) | 
| Set the GameObject associated with the game component.   | |
| virtual void * | GetGameObject () | 
| 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 () | 
| GetType returns the type of the AudioEmitter component.   | |
  Static Public Member Functions inherited from GameComponent | |
| static std::string | GetType () | 
| Get the type of the game component.   | |
Public Attributes | |
| GameObject * | attachedObj = nullptr | 
| attachedObj The game object that the AudioEmitter is attached to.  | |
| Sound * | sound = nullptr | 
| sound The sound object of the AudioEmitter.  | |
| int | volume = 100 | 
| volume The volume of the AudioEmitter. Should be clamped from 0.0 to 1.0.  | |
| float | frequency = 1.0f | 
| frequency The frequency of the AudioEmitter.  | |
| bool | isLooping = false | 
| isLooping Indicates whether the AudioEmitter is looping or not.  | |
Static Public Attributes | |
| static std::map< GameObject *, AudioEmitter * > | componentList | 
| componentList A map of game objects and their corresponding AudioEmitter components.  | |
The AudioEmitter class represents a component that emits audio in a game object.
Represents an audio emitter component that can be attached to a game object.
| AudioEmitter::AudioEmitter | ( | GameObject * | attachedObj | ) | 
AudioEmitter constructor with attached game object.
| attachedObj | The game object to attach the AudioEmitter to. | 
Deserialize deserializes the AudioEmitter data.
| data | The file stream to read the serialized data from. | 
| offset | The offset in the file stream to start reading the serialized data. | 
Reimplemented from Serialized.
      
  | 
  inlinestatic | 
GetType returns the type of the AudioEmitter component.
Serialize serializes the AudioEmitter data.
| data | The file stream to write the serialized data to. | 
| offset | The offset in the file stream to start writing the serialized data. | 
Reimplemented from Serialized.
SetSound sets the sound for the AudioEmitter.
| snd | The sound object. | 
SetSound sets the sound path for the AudioEmitter.
| path | The path of the sound file. |