17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 09:15:56 +02:00

First implementation of graph vehicles

This commit is contained in:
2026-10-14 12:20:49 +02:00
parent 70abf879b3
commit 1ef465264c
121 changed files with 12292 additions and 729 deletions

View File

@@ -150,6 +150,21 @@ void TButton::AssignBool(bool const *bValue) {
bData = bValue;
}
void TButton::AssignSounds( std::string const &Increase, std::string const &Decrease, TDynamicObject const *Owner ) {
if( false == Increase.empty() ) {
m_soundfxincrease.deserialize( Increase, sound_type::single );
}
if( false == Decrease.empty() ) {
m_soundfxdecrease.deserialize( Decrease, sound_type::single );
}
m_soundfxincrease.owner( Owner );
m_soundfxdecrease.owner( Owner );
auto const offset { model_offset() };
m_soundfxincrease.offset( offset );
m_soundfxdecrease.offset( offset );
}
void
TButton::play() {
if( m_state == true ) { m_soundfxincrease.play(); }