Advertisement
Tkap1

Untitled

Oct 21st, 2022 (edited)
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. struct s_wave_enemy
  2. {
  3.     int type;
  4.     int how_many_to_spawn;
  5.     int how_many_spawned;
  6.     float delay;
  7.  
  8.     // @Note(tkap, 02/06/2022): Affects gold reward, exp reward, and max health. This is done to reduce the number of enemies without affecting rewards/balance.
  9.     int power_multiplier;
  10. };
  11.  
  12.  
  13. struct s_wave
  14. {
  15.     b8 started;
  16.     b8 spawned_something;
  17.  
  18.     // @Note(tkap): This cycles between 0 and how many spawn points there are on the map. We then spawn enemies at
  19.     // whatever spawn point is in that index.
  20.     int spawn_index;
  21.  
  22.     float time_passed;
  23.  
  24.     // @Note(tkap): Used to know when all the enemies that this wave spawns have been killed.
  25.     // Everytime an enemy spawned by this wave is killed we decrease this by one. When it reaches 0, this wave
  26.     // has been beaten.
  27.     int total_enemies;
  28.  
  29.     s_sarray<s_wave_enemy, e_enemy_type_count> wave_enemies;
  30. };
  31.  
  32. // This is inside GAME struct
  33. s_wave waves[1000];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement