18 #ifndef HEADER_SUPERTUX_OBJECT_MUSIC_OBJECT_HPP 19 #define HEADER_SUPERTUX_OBJECT_MUSIC_OBJECT_HPP 21 #include "supertux/game_object.hpp" 35 virtual void update(
float dt_sec)
override;
40 static std::string class_name() {
return "music"; }
41 virtual std::string get_class_name()
const override {
return class_name(); }
42 static std::string display_name() {
return _(
"Music"); }
45 virtual const std::string get_icon_path()
const override {
return "images/engine/editor/music.png"; }
49 void play_music(MusicType musictype);
50 void resume_music(
bool instantly =
false);
51 MusicType get_music_type()
const;
53 void set_music(
const std::string& music);
54 const std::string& get_music()
const;
57 MusicType m_currentmusic;
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: music_object.hpp:43
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: music_object.cpp:44
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: music_object.hpp:44
virtual bool is_singleton() const override
If true only a single object of this type is allowed in a given GameObjectManager.
Definition: music_object.hpp:38
Definition: object_settings.hpp:39
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
Definition: music_object.hpp:29
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
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: music_object.cpp:39
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42