-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainEngine.h
More file actions
38 lines (30 loc) · 738 Bytes
/
MainEngine.h
File metadata and controls
38 lines (30 loc) · 738 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
//
// Created by ptdave on 05/12/15.
//
#ifndef GAME_MAINENGINE_H
#define GAME_MAINENGINE_H
#include <iostream>
#include <array>
#include "game.h"
#include "scenes/ptDaveScene.h"
#include "scenes/MainMenu.h"
class MainEngine : public Game {
public:
MainEngine();
enum {
UNINITIALIZED = -1,
PRODUCEDBY = 0,
MAINMENU = 1,
GAME = 2
} States;
protected:
virtual void onUpdate(const sf::Time &time) override;
virtual void onEvent(const sf::Event &event) override;
private:
std::array<bool,sf::Keyboard::KeyCount> keys;
int state;
std::shared_ptr<Scene> m_producedBy;
std::shared_ptr<Scene> m_mainMenu;
std::shared_ptr<Scene> m_game;
};
#endif //GAME_MAINENGINE_H