Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
AudioSourceComponent.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <memory>
9
10namespace shkyera {
11
13class AudioSourceComponent : public BaseComponent<AudioSourceComponent> {
14 public:
18 std::shared_ptr<Sound> sound{};
19
20 bool paused{false};
21 bool loop{false};
22 bool spatialize{false};
23 float volume{1.0};
24 float maxDistance{10};
25};
26
27} // namespace shkyera
Component that enables audio playback for an entity.
Definition AudioSourceComponent.hpp:13
bool spatialize
Definition AudioSourceComponent.hpp:22
float maxDistance
Definition AudioSourceComponent.hpp:24
bool loop
Definition AudioSourceComponent.hpp:21
std::shared_ptr< Sound > sound
Sound instance for playback control.
Definition AudioSourceComponent.hpp:18
bool paused
Definition AudioSourceComponent.hpp:20
HandleAndAsset< Audio > audio
Audio asset to play.
Definition AudioSourceComponent.hpp:16
float volume
Definition AudioSourceComponent.hpp:23
Base component for implementing update functionality.
Definition BaseComponent.hpp:17
Definition Asset.hpp:6
Definition Clock.hpp:9