1 #ifndef UGDK_ACTION_SCENE_H_
2 #define UGDK_ACTION_SCENE_H_
53 void Update(
double delta_t);
64 const std::string&
identifier()
const {
return identifier_; }
65 void set_identifier(
const std::string& new_identifier) { identifier_ = new_identifier; }
69 bool active()
const {
return active_; }
87 render_function_ = render_function;
97 std::string identifier_;
112 bool stops_previous_music_;
115 MediaManager media_manager_;
121 std::function<void (graphic::Canvas& canvas)> render_function_;
A game scene, or screen.
Definition: scene.h:29
bool visible() const
Definition: scene.h:72
virtual void Focus()
Method called when this Scene arrives on the top of the Scene stack.
const std::string & identifier() const
Definition: scene.h:64
audio::Music * background_music() const
Definition: scene.h:81
virtual void DeFocus()
Method called when this Scene leaves the top of the Scene stack.
void set_identifier(const std::string &new_identifier)
Definition: scene.h:65
void set_active(bool is_active)
Definition: scene.h:70
system::EventHandler & event_handler()
Definition: scene.h:78
Definition: animation.h:11
bool finished() const
Definition: scene.h:67
void set_render_function(const std::function< void(graphic::Canvas &canvas)> &render_function)
Definition: scene.h:85
bool active() const
Definition: scene.h:69
Definition: eventhandler.h:40
void set_visible(bool is_visible)
Definition: scene.h:73
virtual void OnPushed(int index)
Method called when this scene is pushed to the Engine's Scene stack.
Definition: scene.h:41
const MediaManager & media_manager() const
Definition: scene.h:76
void Update(double delta_t)
Logical update of the scene.
void Finish()
Finishes the scene.
MediaManager & media_manager()
Definition: scene.h:75
void StopsPreviousMusic(bool set)
Whether this scene stops the previous music even if wont play any music.
Definition: scene.h:47
void Render(graphic::Canvas &) const
Renders the scene to the given canvas if the scene is visible.
const system::EventHandler & event_handler() const
Definition: scene.h:79
void set_background_music(audio::Music *music)
Definition: scene.h:82
virtual void End()
Ends the scene activity.
Definition: taskplayer.h:11