46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
#ifndef PIXELDEFENSE_WAVE_H
|
|
#define PIXELDEFENSE_WAVE_H
|
|
|
|
#include <breeze.h>
|
|
|
|
typedef struct WaveData {
|
|
i32 numOrcs; // How many orcs to send
|
|
f32 orcSendRate; // How many orcs to send per second
|
|
i32 numGoblins; // How many goblins to send
|
|
f32 goblinSendRate; // How many goblins to send per second
|
|
f32 difficultyScale; // Scale for health and damage
|
|
f32 timeBeforeStart; // Time before start sending (seconds)
|
|
} WaveData;
|
|
|
|
typedef struct WaveInfo {
|
|
i32 number;
|
|
WaveData data;
|
|
i32 orcsToSend;
|
|
f32 orcsElapsed;
|
|
i32 goblinsToSend;
|
|
f32 goblinsElapsed;
|
|
f32 elapsed;
|
|
bool started;
|
|
} WaveInfo;
|
|
|
|
|
|
typedef struct EnemyWaves {
|
|
i32 numWaves;
|
|
const WaveData *waves;
|
|
} EnemyWaves;
|
|
|
|
typedef struct Game Game;
|
|
|
|
EnemyWaves getDefaultWaves();
|
|
EnemyWaves getMainMenuWaves();
|
|
|
|
WaveInfo getWaveInfo(const EnemyWaves *waves, i32 idx);
|
|
|
|
void updateWave(WaveInfo *wave, Game *game, f32 dt);
|
|
|
|
bool isWaveSendingOver(const WaveInfo *wave);
|
|
bool isWaveOver(const WaveInfo *wave);
|
|
|
|
|
|
#endif //PIXELDEFENSE_WAVE_H
|