|
Monad Engine da02fba2
> Undercity Codex_
|
#include <AudioComponent.h>
Inheritance diagram for eng::AudioComponent:
Collaboration diagram for eng::AudioComponent:Public Member Functions | |
| void | LoadProperties (const nlohmann::json &json) override |
| void | Update (float deltaTime) override |
| void | RegisterAudio (const std::string &name, std::shared_ptr< Audio > &clip) |
| void | Play (const std::string &name, bool loop=false) |
| void | Stop (const std::string &name) |
| bool | IsPlaying (const std::string &name) |
| virtual void | Init () |
| virtual size_t | GetTypeId () const =0 |
| GameObject * | GetOwner () |
Static Public Member Functions | |
| template<typename T > | |
| static size_t | StaticTypeId () |
Protected Attributes | |
| GameObject * | m_owner = nullptr |
Definition at line 7 of file AudioComponent.h.
|
inherited |
Definition at line 15 of file Component.cpp.
References eng::Component::m_owner.
Referenced by eng::MeshComponent::Update(), and eng::SpriteComponent::Update().
|
pure virtualinherited |
|
virtualinherited |
Reimplemented in eng::PhysicsComponent, and eng::PlayerControllerComponent.
Definition at line 11 of file Component.cpp.
Referenced by eng::GameObject::AddComponent().
| bool eng::AudioComponent::IsPlaying | ( | const std::string & | name | ) |
Definition at line 67 of file AudioComponent.cpp.
Referenced by Player::Update().
|
overridevirtual |
Reimplemented from eng::Component.
Definition at line 6 of file AudioComponent.cpp.
References eng::Audio::Load(), and RegisterAudio().
| void eng::AudioComponent::Play | ( | const std::string & | name, |
| bool | loop = false |
||
| ) |
Definition at line 43 of file AudioComponent.cpp.
Referenced by Player::Update().
| void eng::AudioComponent::RegisterAudio | ( | const std::string & | name, |
| std::shared_ptr< Audio > & | clip | ||
| ) |
Definition at line 38 of file AudioComponent.cpp.
Referenced by LoadProperties().
|
inlinestaticinherited |
Definition at line 26 of file Component.h.
| void eng::AudioComponent::Stop | ( | const std::string & | name | ) |
Definition at line 55 of file AudioComponent.cpp.
Referenced by Player::Update().
|
overridevirtual |
Implements eng::Component.
Definition at line 26 of file AudioComponent.cpp.
References eng::GameObject::GetWorldPosition(), and eng::Component::m_owner.
|
protectedinherited |
Definition at line 33 of file Component.h.
Referenced by eng::GameObject::AddComponent(), eng::Component::GetOwner(), eng::CameraComponent::GetViewMatrix(), eng::PhysicsComponent::Init(), eng::PlayerControllerComponent::Init(), Update(), eng::AudioListenerComponent::Update(), eng::PhysicsComponent::Update(), and eng::PlayerControllerComponent::Update().