-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathObjects.hpp
48 lines (45 loc) · 1.08 KB
/
Objects.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
#pragma once
#include <ctime>
#include <SDL.h>
#include "Sprite.hpp"
#include "Spike.hpp"
#include "DoubleSpike.hpp"
#include "TripleSpike.hpp"
#include "HangingBase2.hpp"
#include "BlockSpike.hpp"
#include "SpikeDSpike.hpp"
#include "SpikeDSpike2.hpp"
#include "JumpDJump.hpp"
#include "JumpDJump2.hpp"
#include "Obstacles.hpp"
#include "platform.hpp"
#include <vector>
#include <list>
#include <cstdlib>
#include <iostream>
using namespace std;
class Objects
{
public:
Objects() = default;
~Objects();
void drawObjects();
void createObstacles();
void createEssentials();
bool addObstacle() const;
bool EndGame() const;
void update(SDL_Event &e);
void reset();
private:
vector<Obstacles *> L;
Sprite* S{nullptr};
platform* base{nullptr};
static bool crash;
static bool flag;
static float velocity;
const static float jumpVelocity;
const static float gravity;
Obstacles* Prev{nullptr};
int starting_x{0};
int starting_y{0};
};