2022-06-12 17:49:42 +00:00
|
|
|
/*
|
|
|
|
- Avoid ~ a game by Canneddonuts
|
|
|
|
- Filename ~ Gameplay.h
|
|
|
|
- Author ~ Return0ne
|
|
|
|
- 2022
|
|
|
|
- *no license*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GAMEPLAY_HEADER
|
|
|
|
#define GAMEPLAY_HEADER
|
|
|
|
|
2022-06-19 21:36:26 +00:00
|
|
|
#define MAX_FIREWORKS 10
|
2022-06-29 16:11:37 +00:00
|
|
|
#define PLAYER_HP 3
|
2022-07-08 20:00:38 +00:00
|
|
|
#define MAX_SHOOTS 3
|
2022-06-18 16:10:36 +00:00
|
|
|
|
2022-06-17 16:32:35 +00:00
|
|
|
struct Actor {
|
2022-06-12 17:49:42 +00:00
|
|
|
float speed;
|
|
|
|
int hp;
|
|
|
|
int currentframe;
|
2022-08-22 19:16:28 +00:00
|
|
|
float iframetimer;
|
2022-06-12 17:49:42 +00:00
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle frameRec;
|
|
|
|
Rectangle hitbox;
|
2022-06-26 23:43:39 +00:00
|
|
|
Color color;
|
2022-08-27 18:08:36 +00:00
|
|
|
Sound fxhit;
|
2022-08-02 13:38:36 +00:00
|
|
|
bool in;
|
2022-06-17 02:17:26 +00:00
|
|
|
};
|
2022-06-12 17:49:42 +00:00
|
|
|
|
2022-06-17 02:17:26 +00:00
|
|
|
struct Item {
|
2022-06-12 17:49:42 +00:00
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle hitbox;
|
|
|
|
bool active;
|
2022-07-08 20:00:38 +00:00
|
|
|
Color color;
|
|
|
|
int power;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Attack {
|
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle hitbox;
|
|
|
|
Vector2 speed;
|
|
|
|
int active;
|
|
|
|
Color color;
|
2022-06-17 02:17:26 +00:00
|
|
|
};
|
2022-06-12 17:49:42 +00:00
|
|
|
|
2022-06-17 16:32:35 +00:00
|
|
|
struct Actor player = { 0 };
|
|
|
|
struct Actor enemy = { 0 };
|
2022-07-08 20:00:38 +00:00
|
|
|
struct Attack fireworks[MAX_FIREWORKS] = { 0 };
|
|
|
|
struct Attack shoot[MAX_SHOOTS] = { 0 };
|
2022-08-22 19:16:28 +00:00
|
|
|
struct Item feather = { 0 };
|
2022-07-04 01:08:45 +00:00
|
|
|
Sound fxfeather = { 0 };
|
2022-06-12 17:49:42 +00:00
|
|
|
bool pause;
|
2022-07-26 23:12:36 +00:00
|
|
|
bool DebugMode;
|
2022-07-08 20:00:38 +00:00
|
|
|
int ammo = 0;
|
2022-09-20 01:28:10 +00:00
|
|
|
int fireworkAmount = 0;
|
2022-07-15 16:59:37 +00:00
|
|
|
int GI_callcount = 0;
|
|
|
|
|
2022-06-12 17:49:42 +00:00
|
|
|
#endif
|