Fade out and pause music on death and resume on restart of level, fixes #1064
[supertux.git] / src / supertux / game_session.hpp
index 725f5e0..0499e2d 100644 (file)
@@ -52,7 +52,8 @@ public:
 
   void draw(DrawingContext& context);
   void update(float frame_ratio);
-  void setup();
+  void setup() override;
+  void leave() override;
 
   /// ends the current level
   void finish(bool win = true);
@@ -78,7 +79,7 @@ public:
    * resources for the current level/world
    */
   std::string get_working_directory();
-  int restart_level();
+  int restart_level(bool after_death = false);
 
   void toggle_pause();
   void abort_level();
@@ -118,7 +119,7 @@ private:
   int levelnb;
   int pause_menu_frame;
 
-  EndSequence* end_sequence;
+  std::shared_ptr<EndSequence> end_sequence;
 
   bool  game_pause;
   float speed_before_pause;