|
supertux
|
Screen that runs a Level, where Players run and jump through Sectors. More...
#include <game_session.hpp>


Public Member Functions | |
| GameSession (const std::string &levelfile, Savegame &savegame, Statistics *statistics=nullptr, bool preserve_music=false) | |
| virtual void | draw (Compositor &compositor) override |
| gets called once per frame. More... | |
| virtual void | update (float dt_sec, const Controller &controller) override |
| gets called for once (per logical) frame. More... | |
| virtual void | setup () override |
| gets called before this screen gets activated (which is at least once before the first draw or update call | |
| virtual void | leave () override |
| gets called when the current screen is temporarily suspended | |
| virtual IntegrationStatus | get_status () const override |
| Gives details about what the user is doing right now. More... | |
| void | finish (bool win=true) |
| ends the current level | |
| void | respawn (const std::string §orname, const std::string &spawnpointname) |
| void | respawn_with_fade (const std::string §orname, const std::string &spawnpointname, const ScreenFade::FadeType fade_type, const Vector &fade_point, const bool make_invincible=false) |
| void | reset_level () |
| void | set_start_point (const std::string §orname, const std::string &spawnpointname) |
| void | set_start_pos (const std::string §orname, const Vector &pos) |
| void | set_respawn_point (const std::string §orname, const std::string &spawnpointname) |
| void | set_respawn_pos (const std::string §orname, const Vector &pos) |
| void | clear_respawn_points () |
| const SpawnPoint & | get_last_spawnpoint () const |
| void | set_checkpoint_pos (const std::string §orname, const Vector &pos) |
| const SpawnPoint * | get_active_checkpoint_spawnpoint () const |
| Sector & | get_current_sector () const |
| Level & | get_current_level () const |
| void | start_sequence (Player *caller, Sequence seq, const SequenceData *data=nullptr) |
| void | set_target_timer_paused (bool paused) |
| std::string | get_working_directory () const |
| returns the "working directory" usually this is the directory where the currently played level resides. More... | |
| const std::string & | get_level_file () const |
| bool | has_active_sequence () const |
| int | restart_level (bool after_death=false, bool preserve_music=false) |
| void | toggle_pause () |
| void | abort_level () |
| bool | is_active () const |
| Savegame & | get_savegame () const |
| void | set_scheduler (SquirrelScheduler &new_scheduler) |
Public Attributes | |
| bool | reset_button |
| bool | reset_checkpoint_button |
| bool | m_prevent_death |
| true if players should enter ghost mode instead of dying | |
Additional Inherited Members | |
Static Public Member Functions inherited from Currenton< GameSession > | |
| static GameSession * | current () |
|
overridevirtual |
gets called once per frame.
The screen should draw itself in this function. State changes should not be done in this function, but rather in update
Implements Screen.
|
overridevirtual |
Gives details about what the user is doing right now.
Implements Screen.
| std::string GameSession::get_working_directory | ( | ) | const |
returns the "working directory" usually this is the directory where the currently played level resides.
This is used when locating additional resources for the current level/world
|
overridevirtual |
gets called for once (per logical) frame.
Screens should do their state updates and logic here
Implements Screen.
1.8.13