-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRocket.hpp
More file actions
69 lines (56 loc) · 1.36 KB
/
Rocket.hpp
File metadata and controls
69 lines (56 loc) · 1.36 KB
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
64
65
66
67
68
69
#include <SDL2/SDL.h>
#include <SDL_image.h>
#include <cmath>
#include <iostream>
#include "particles.h"
#ifndef ROCKET_H_
#define ROCKET_H_
#include "rocks.h"
#include "PowerUps.hpp"
class sun;
//const int TOTAL_PARTICLES = 20;
class Rocket{
friend class bigrock;
friend class smallrock;
friend class sun;
public:
Rocket(double ang, double x, double y);
//~Rocket();
void handleEvent(SDL_Event& e, int id);
void moveRocket();
void rotateRocket();
void accelerateRocket();
void boostRocket();
bool checkwin(Rocket &enemy);
void reset(double ang, int x0, int y0);
void UpdatePowerUps();
void render();
Rocket operator--(int);
static const int ROCKET_WIDTH = 75;
static const int ROCKET_HEIGHT = 75;
double x, y, dx, dy;
int rocketBoost = 3;
const int boost_cooldown = 100;
int death;
bool PU_reverse;
bool PU_speed;
bool PU_blade;
bool PU_laser;
bool PU_mine;
void renderParticles();
int ang_vel = 10;
const int ang_accle = 2;
private:
int angle;
int color;
int dir;
int accel = 6;
int ROCKET_V = 12;
int shotCooldown;
int PUS_cooldown;
const int boost_speed = 50;
const int hitbox = 30;
const double dt = 0.033333;
Particle *particles[20];
};
#endif