Aether3D Game Engine
AudioSourceComponent.hpp
1 #ifndef AUDIO_SOURCE_COMPONENT
2 #define AUDIO_SOURCE_COMPONENT
3 
4 #include <string>
5 
6 namespace ae3d
7 {
10  {
11  public:
13  void SetClipId( unsigned audioClipId );
14 
16  void Play() const;
17 
19  std::string GetSerialized() const;
20 
21  private:
22  friend class GameObject;
23 
25  static int Type() { return 3; }
26 
28  static unsigned New();
29 
31  static AudioSourceComponent* Get( unsigned index );
32 
33  unsigned clipId = 0;
34  };
35 }
36 
37 #endif
Definition: AudioClip.hpp:4
void Play() const
Plays the clip.
std::string GetSerialized() const
GameObject is composed of components that define its behavior.
Definition: GameObject.hpp:9
Contains an audio clip and methods to play it.
Definition: AudioSourceComponent.hpp:9
void SetClipId(unsigned audioClipId)