1 // SuperTux -- LevelIntro screen
2 // Copyright (C) 2008 Christoph Sommer <christoph.sommer@2008.expires.deltadevelopment.de>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef HEADER_SUPERTUX_SUPERTUX_LEVELINTRO_HPP
18 #define HEADER_SUPERTUX_SUPERTUX_LEVELINTRO_HPP
20 #include "sprite/sprite.hpp"
21 #include "supertux/level.hpp"
22 #include "supertux/screen.hpp"
23 #include "supertux/timer.hpp"
29 * Screen that welcomes the player to a level
31 class LevelIntro : public Screen
34 static Color header_color;
35 static Color author_color;
36 static Color stat_hdr_color;
37 static Color stat_color;
40 LevelIntro(const Level* level, const Statistics* best_level_statistics);
41 virtual ~LevelIntro();
44 void draw(DrawingContext& context);
45 void update(float elapsed_time);
48 const Level* level; /**< The level of which this is the intro screen */
49 const Statistics* best_level_statistics; /**< Best level statistics of the level of which is the intro screen */
50 SpritePtr player_sprite; /**< Sprite representing the player */
51 float player_sprite_py; /**< Position (y axis) for the player sprite */
52 float player_sprite_vy; /**< Velocity (y axis) for the player sprite */
53 Timer player_sprite_jump_timer; /**< When timer fires, the player sprite will "jump" */
56 LevelIntro(const LevelIntro&);
57 LevelIntro& operator=(const LevelIntro&);