forked from CircusGames/Last_Resort
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemyProtator.h
97 lines (73 loc) · 1.59 KB
/
EnemyProtator.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef __ENEMYPROTATOR_H__
#define __ENEMYPROTATOR_H__
#include "Enemy.h"
#include "ModuleTextures.h"
#include "Module.h"
//#include "ModulePlayer.h"
class EnemyProtator : public Enemy
{
private:
Animation protatorAnim;
Animation protatorDamageAnim;
iPoint targetPos;
bool targetPosReached;
bool aimed;
//float tx;
//float ty;
float velX;
float velY;
float distance;
float lastVelY;
float maxVelY;
Animation* current_animation;
iPoint preAimedLocalPos;
bool ready;
bool propulsion;
bool goingDown;
bool grounded;
bool rightCollision;
bool leftCollision;
bool animGrounded;
bool restartCycle;
Uint32 start_time;
Uint32 now;
Uint32 aimTime;
//shooting needed variables
float vx;
float vy;
float shootSpeed;
int cadence;
bool attack;
Uint32 start_shot_time;
Uint32 nowShotTime;
int txShot;
int tyShot;
// ------------------------
// receiving damage values
//bool receiveDamage;
Uint32 start_damage_time;
Uint32 nowDamagetime;
Uint32 damageAnimTime;
float current_frame;
//
int restrictionYvalue;
bool restrictionY;
iPoint checkValidPlayerY();
//iPoint nearestValidPlayerY;
int nearestValidPlayerPosition;
bool toAim = false;
public:
EnemyProtator(int x, int y, powerUpTypes type, SDL_Texture* thisTexture);
~EnemyProtator();
//~Enemy();
void Move();
void Draw();
void OnCollision(Collider* collider, Collider* collider2);
const Collider* EnemyProtator::GetCollider() const;
Collider* rightCollider;
Collider* leftCollider;
Collider* debugWall1;
Collider* debugWall2;
Module* desiredPlayerModule = nullptr;
};
#endif // __ENEMYPROTATOR__H__