-
Notifications
You must be signed in to change notification settings - Fork 1
/
ModuleTentacles.h
55 lines (47 loc) · 1.06 KB
/
ModuleTentacles.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
#ifndef __MODULETENTACLES_H__
#define __MODULETENTACLES_H__
#include "p2Point.h"
#include "Animation.h"
#include "ModuleCollision.h"
#define MAX_TENTACLES 14
struct SDL_Texture;
struct SDL_Rect;
struct Collider;
struct Tentacle {
Collider* collider = nullptr;
iPoint first_point;
iPoint second_point;
float max_angle;
float radian;
bool anchor = false;
Animation anim;
bool flip = false;
Tentacle();
Tentacle(const Tentacle& p);
bool Update();
};
class ModuleTentacles : public Module
{
public:
bool blit_tentacle = false;
Tentacle tentacle;
Tentacle anchor_top;
Tentacle anchor_bottom;
Tentacle* tentacles[MAX_TENTACLES];
Uint32 start_time = 0;
private:
SDL_Texture * graphics = nullptr;
public:
ModuleTentacles();
~ModuleTentacles();
bool Start();
update_status Update();
bool CleanUp();
void AddTentacle(const Tentacle& tentacle, int x, int y, float max_angle, bool flip = false, bool anchor = false);
void RemoveTentacle();
void setPosition(int x, int y);
void ShootLaser();
void removeCollider();
void BlitTentacles();
};
#endif // __ENEMY_H__