forked from jaildesigner-jailgames/jaildoctors_dilemma
Transició a surface: vaig per title.cpp
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
#include "game_over.h"
|
||||
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include <algorithm> // for min, max
|
||||
#include <string> // for basic_string, operator+, to_string, cha...
|
||||
#include "animated_sprite.h" // for AnimatedSprite
|
||||
#include "defines.h" // for GAMECANVAS_CENTER_X, GAME_SPEED
|
||||
#include "global_events.h" // for check
|
||||
#include "global_inputs.h" // for check
|
||||
#include "jail_audio.h" // for JA_PlayMusic
|
||||
#include "options.h" // for Options, options, OptionsStats, Section...
|
||||
#include "resource.h" // for Resource
|
||||
#include "screen.h" // for Screen
|
||||
#include "text.h" // for TEXT_CENTER, TEXT_COLOR, Text
|
||||
#include "texture.h" // for Texture
|
||||
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include <algorithm> // for min, max
|
||||
#include <string> // for basic_string, operator+, to_string, cha...
|
||||
#include "s_animated_sprite.h" // for AnimatedSprite
|
||||
#include "defines.h" // for GAMECANVAS_CENTER_X, GAME_SPEED
|
||||
#include "global_events.h" // for check
|
||||
#include "global_inputs.h" // for check
|
||||
#include "jail_audio.h" // for JA_PlayMusic
|
||||
#include "options.h" // for Options, options, OptionsStats, Section...
|
||||
#include "resource.h" // for Resource
|
||||
#include "screen.h" // for Screen
|
||||
#include "text.h" // for TEXT_CENTER, TEXT_COLOR, Text
|
||||
#include "surface.h" // for Texture
|
||||
|
||||
// Constructor
|
||||
GameOver::GameOver()
|
||||
: player_sprite_(std::make_shared<AnimatedSprite>(Resource::get()->getTexture("player_game_over.png"), Resource::get()->getAnimations("player_game_over.ani"))),
|
||||
tv_sprite_(std::make_shared<AnimatedSprite>(Resource::get()->getTexture("tv.png"), Resource::get()->getAnimations("tv.ani"))),
|
||||
: player_sprite_(std::make_shared<AnimatedSprite>(Resource::get()->getSurface("player_game_over.gif"), Resource::get()->getAnimations("player_game_over.ani"))),
|
||||
tv_sprite_(std::make_shared<AnimatedSprite>(Resource::get()->getSurface("tv.gif"), Resource::get()->getAnimations("tv.ani"))),
|
||||
pre_counter_(0),
|
||||
counter_(0),
|
||||
ticks_(0)
|
||||
{
|
||||
options.section.section = Section::GAME_OVER;
|
||||
options.section.subsection = Subsection::NONE;
|
||||
|
||||
|
||||
player_sprite_->setPosX(GAMECANVAS_CENTER_X + 10);
|
||||
player_sprite_->setPosY(30);
|
||||
tv_sprite_->setPosX(GAMECANVAS_CENTER_X - tv_sprite_->getWidth() - 10);
|
||||
|
||||
Reference in New Issue
Block a user