-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
64 lines (47 loc) · 1.31 KB
/
Game.h
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
63
#pragma once
#include <SFML\Graphics.hpp>
#include <SFML\Audio.hpp>
#include "Includes.h"
#include "Player.h"
#include "AnimatedSprite.h"
#include "Textures.h"
#include "Enemy.h"
#include "Tilemap.h"
#include "Map.h"
#include "LightSystem.h"
#include "Laser.h"
#include "ParticleEngine.h"
//Handles the gameplay state, holds its entities like enemies and player would hold score etc...
//Handles interaction between entities
//TODO: Gameplay states for easy seperate levels possibly, think about it more
class Game
{
private:
std::vector<Laser*> mLasers;
ParticleEngine particleEngine;
//store entities
Player mPlayer;
Map mMap;
sf::SoundBuffer mLaserSoundBuffer;
sf::Sound mLaserSound;
//drawing stuff
Textures *mTextureHolder;
sf::Sprite mBackground;
sf::Font mFont;
sf::View* mView;
bool lighting;
public:
Game(Textures *pTextureHolder, sf::View * pView);
virtual ~Game(void);
void update(ltbl::LightSystem * lightSystem, ltbl::Light_Point * light);
void draw(sf::RenderWindow *window, float pInterpolation, ltbl::LightSystem * lightSystem);
void input(sf::Event *pEvent);
//add and delete for each vector
void addLaser(float pX, float pY, float xVel, float yVel);
void removeLaser(int pIndex);
void nextlevel();
void reset();
void quit();
//TODO: should probably have an init
void init();
};