-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBubble.h
46 lines (37 loc) · 789 Bytes
/
Bubble.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
#pragma once
#include "Light.h"
#include "Material.h"
#include <vector>
#include <ctime>
#include "Object.h"
using namespace std;
enum DIRECT { D_LEFT, D_RIGHT, D_UP };
class Bubble: public Object
{
public:
Bubble();
void setMaterial(Material m);
void setSize(float s);
void setDirection(DIRECT d);
void initialize();
void grow();
bool checkVerticalBoundary();
bool checkUpperBoundary();
bool isGrown();
bool isTrapping();
bool isAlive();
void kill();
bool mapCollision(vector<vector<float>> borderHard);
float getRadius();
virtual Hitbox getHitbox() override;
clock_t getCreatedTime();
void draw();
float size;
bool trapping;
bool alive;
clock_t createdTime;
DIRECT direction;
Material mtl;
float horizontal_speed = 0.09f;
float max_radius = 0.08f;
};