Wave incrementing

This commit is contained in:
2024-02-11 19:23:40 +01:00
parent 0319a0a5b3
commit bfc1bc425f
7 changed files with 73 additions and 10 deletions

View File

@@ -18,18 +18,19 @@ typedef struct WaveInfo {
i32 orcsToSend;
f32 orcsElapsed;
i32 goblinsToSend;
f32 golbinsElapsed;
f32 goblinsElapsed;
f32 elapsed;
bool started;
} WaveInfo;
#define NUM_WAVES 5
static WaveData predefWaves[NUM_WAVES] = {
{ 10, 1.0f, 20, 2.0f, 0, 5 * 60 * 60 },
{ 20, 1.0f, 40, 2.0f, 0, 2 * 60 * 60 },
{ 25, 1.0f, 80, 2.2f, 0, 2 * 60 * 60 },
{ 50, 1.2f, 120, 3.0f, 0, 1.5 * 60 * 60 },
{ 100, 2.0f, 220, 4.0f, 0, 60 * 60 },
{ 10, 1.0f, 20, 2.0f, 0, 5 * 60 },
{ 20, 1.0f, 40, 2.0f, 0, 2 * 60 },
{ 25, 1.0f, 80, 2.2f, 0, 2 * 60 },
{ 50, 1.2f, 120, 3.0f, 0, 1.5f * 60 },
{ 100, 2.0f, 220, 4.0f, 0, 1.0f * 60 },
};
WaveInfo getWaveInfo(i32 idx);
@@ -37,6 +38,7 @@ WaveInfo getWaveInfo(i32 idx);
void updateWave(WaveInfo *wave, f32 dt);
bool isWaveSendingOver(const WaveInfo *wave);
bool isWaveOver(const WaveInfo *wave);
#endif //PIXELDEFENSE_WAVE_H