-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScene.hpp
More file actions
40 lines (31 loc) · 770 Bytes
/
Scene.hpp
File metadata and controls
40 lines (31 loc) · 770 Bytes
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
#ifndef __SCENE_HPP__
#define __SCENE_HPP__
#include "utils.hpp"
class Game;
class Scene {
friend class Game;
public:
Scene(Game* g, sf::RenderWindow* w);
virtual ~Scene();
virtual void init(int=0);
void run();
void killScene();
sf::View* getPtrView();
std::string getSceneName();
protected:
Game* _game;
sf::RenderWindow* _window;
sf::View _view;
virtual void processInput();
virtual void update(float deltaTime);
void render();
virtual void render(sf::RenderTarget* target);
void initView(sf::Vector2i windowSize);
virtual void changeScene(std::string nextScene, int players);
virtual void display();
private:
bool _killed;
std::string _nextSceneName;
float _players;
};
#endif