-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModuleEnemies.h
More file actions
136 lines (116 loc) · 3.21 KB
/
ModuleEnemies.h
File metadata and controls
136 lines (116 loc) · 3.21 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#ifndef _MODULEENEMIES_H__
#define _MODULEENEMIES_H__
#include "Module.h"
#include "EnemyTank.h"
#include "BasicEnemy.h"
#include "EnemyOscilatory.h"
#include "EnemyBee.h"
#include "EnemyRedbird.h"
#include "EnemyLamella.h"
#include "EnemyMiniTank.h"
#include "EnemySubmarine.h"
#include "EnemyDiver.h"
#include "EnemyPilot.h"
#include "ModuleParticles.h"
//#include "Enemy.h"
#define MAX_ENEMIES 300
enum ENEMY_TYPES
{
NO_TYPE,
BASIC_ENEMY,
ENEMYOSCILATORY,
REDBIRD,
TANK,
ENEMYBEE,
POWERUP_BEE,
ENEMYPROTATOR,
LAMELLA,
MINITANK,
SUBMARINE,
DIVER,
ENEMYPILOT,
HOMINGMISSILE,
BIGFUCKINGROCKET,
BIGDADDY,
COLDMACHINE,
COLDMACHINEBOMBARDIER,
SHURIKEN
};
//class Enemy;
//struct SDL_Texture;
struct EnemyInfo
{
ENEMY_TYPES type = ENEMY_TYPES::NO_TYPE;
int x, y;
//SDL_Texture* texture;
powerUpTypes powerUpType = powerUpTypes::NONE;
};
class ModuleEnemies : public Module
{
public:
ModuleEnemies();
~ModuleEnemies();
bool Start();
update_status PreUpdate();
update_status Update();
update_status PostUpdate();
bool CleanUp();
void OnCollision(Collider* c1, Collider* c2);
bool AddEnemy(ENEMY_TYPES type, int x, int y, powerUpTypes powerUpType);
//void pleaseKillMe(Enemy*);
//more textures - in public because we call outside this module
//more enemies textures -------
SDL_Texture* enemy1Texture = nullptr;
SDL_Texture* enemy2Texture = nullptr;
SDL_Texture* enemyTankTexture = nullptr;
SDL_Texture* enemyBeeTexture = nullptr;
SDL_Texture* beeBulletTexture = nullptr;
SDL_Texture* enemyRedbirdTexture = nullptr;
SDL_Texture* enemyPowerBeeTexture = nullptr;
SDL_Texture* enemyProtatorTexture = nullptr;
SDL_Texture* enemyLamellaTexture = nullptr;
SDL_Texture* enemyMiniTankTexture = nullptr;
SDL_Texture* enemySubmarineTexture = nullptr;
SDL_Texture* enemyDiverTexture = nullptr;
SDL_Texture* enemyPilotTexture = nullptr;
SDL_Texture* enemyHomingMissileTexture = nullptr;
SDL_Texture* enemyDiverBeamTexture = nullptr;
SDL_Texture* enemyBigDaddyTexture = nullptr;
SDL_Texture* enemyColdMachineTexture = nullptr;
// ----------------------------
//ENEMY PARTICLES
Particle beeBulletGoodBye;
Particle beeBullet;
Particle tankBigShot;
Particle tankSmallShot;
Particle homingExplosion;
Particle diverBeamLeft;
Particle diverBeamRight;
// particles boss level 3 - Cold Machine
Particle coldMachineFootFire;
Particle coldMachineFootSmoke;
Particle coldMachinePiecesSmoke;
Particle coldMachineLegMissileFlash;
Particle coldMachineKneeLaser;
Particle coldMachineKneeLaserShotEffect;
Particle coldMachineArmShootSmoke;
Particle shurikenDeath;
// bombardier relatives
Particle bombardierBomb;
Particle bombardierBombGenImpact;
Particle bombardierBombWallImpact;
// fase 2 particles ------------------
// glass canonn relatives
Particle glassShoot;
Particle glassRotary;
Particle glassUpwardsShoot;
Particle glassShootEffect;
private:
void SpawnEnemy(EnemyInfo& info);// , powerUpTypes powerUpType = powerUpTypes::NONE, SDL_Texture* texture = nullptr);
private:
EnemyInfo queue[MAX_ENEMIES];
Enemy* enemies[MAX_ENEMIES];
SDL_Texture* sprites; //general spriteSheet texture, used when we call AddEnemy from the scene without
//specificate exclusive texture
};
#endif // _MODULEENEMIES_H__