-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScene.hpp
62 lines (43 loc) · 1.2 KB
/
Scene.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef __SCENE_HPP__
#define __SCENE_HPP__
#include "utils.hpp"
class Game;
class Scene {
friend class Game;
public:
Scene(Game* g, sf::RenderWindow* w, sceneTypes sT, std::string name);
virtual ~Scene();
virtual void init(sf::Vector2f sceneIniCoord = sf::Vector2f(0,0));
void run();
void killScene();
std::string getLanguage();
virtual sceneTypes getType();
sf::View* getPtrView();
std::string getSceneName();
void playMusic();
void stopMusic();
void setMusic(const std::string &name);
protected:
bool _focus;
Game* _game;
sf::View _view;
std::string _musicName;
std::string _sceneName;
sf::RenderWindow* _window;
void render();
virtual void display();
virtual void resizing();
virtual void processInput();
virtual void update(float deltaTime);
virtual void changeScene(std::string str);
virtual void render(sf::RenderTarget* target);
void initView(sf::View* view, sf::Vector2i windowSize);
void initViewExpanded(sf::View* view, sf::Vector2i windowSize);
private:
bool _killed;
sceneTypes _sceneType;
std::string _nextScene;
sf::Sprite _mousePointer;
void withoutFocus();
};
#endif