Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::audio::SoundEvent Struct Reference

Component for triggering one-time sound effects (SFX) More...

#include <SoundEvent.hpp>

Collaboration diagram for rtp::ecs::components::audio::SoundEvent:

Public Attributes

std::string soundPath
 Path to the sound file.
 
float volume {1.0f}
 Volume level (0.0 - 1.0)
 
float pitch {1.0f}
 Pitch multiplier.
 
bool played {false}
 Whether the sound has been triggered.
 

Detailed Description

Component for triggering one-time sound effects (SFX)

Used for events like gunshots, explosions, impacts. The AudioSystem plays the sound once and can optionally remove the component.

Definition at line 20 of file SoundEvent.hpp.

Member Data Documentation

◆ pitch

float rtp::ecs::components::audio::SoundEvent::pitch {1.0f}

Pitch multiplier.

Definition at line 23 of file SoundEvent.hpp.

Referenced by rtp::client::UISystem::playClickSound(), and rtp::client::AudioSystem::playSoundEffect().

◆ played

bool rtp::ecs::components::audio::SoundEvent::played {false}

Whether the sound has been triggered.

Definition at line 24 of file SoundEvent.hpp.

◆ soundPath

std::string rtp::ecs::components::audio::SoundEvent::soundPath

◆ volume

float rtp::ecs::components::audio::SoundEvent::volume {1.0f}

The documentation for this struct was generated from the following file: