17 #ifndef HEADER_SUPERTUX_SOUND_OBJECT_HPP 18 #define HEADER_SUPERTUX_SOUND_OBJECT_HPP 20 #include "supertux/game_object.hpp" 28 static void register_class(ssq::VM& vm);
36 virtual void update(
float dt_sec)
override;
38 static std::string class_name() {
return "sound-object"; }
39 virtual std::string get_class_name()
const override {
return class_name(); }
40 virtual std::string get_exposed_class_name()
const override {
return "SoundObject"; }
41 static std::string display_name() {
return _(
"Sound"); }
44 virtual const std::string get_icon_path()
const override {
return "images/engine/editor/sound.png"; }
54 #ifdef DOXYGEN_SCRIPTING 79 std::unique_ptr<SoundSource> m_sound_source;
84 void prepare_sound_source();
virtual void stop_looping_sounds() override
stops all looping sounds
Definition: sound_object.cpp:81
void set_volume(float volume)
Sets the volume of sound played by SoundObject.
Definition: sound_object.cpp:126
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: sound_object.hpp:42
float get_volume() const
Returns the volume of sound played by SoundObject.
Definition: sound_object.cpp:133
Definition: object_settings.hpp:39
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sound_object.hpp:43
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: sound_object.hpp:35
Plays sound at given interval with specified volume hearable in entire Sector.
Definition: sound_object.hpp:25
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: sound_object.cpp:57
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
A sound source represents the source of audio output.
Definition: sound_source.hpp:25
virtual GameObjectClasses get_class_types() const
List notable classes in inheritance hierarchy of class.
Definition: game_object.cpp:113
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
Definition: reader_mapping.hpp:32
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
virtual void play_looping_sounds() override
continues all looping sounds
Definition: sound_object.cpp:88