2022-06-12 17:49:42 +00:00
|
|
|
/*
|
|
|
|
- Avoid ~ a game by Canneddonuts
|
2022-11-19 01:21:28 +00:00
|
|
|
- Filename ~ Gstructs.h
|
2022-06-12 17:49:42 +00:00
|
|
|
- Author ~ Return0ne
|
|
|
|
- 2022
|
|
|
|
- *no license*
|
|
|
|
*/
|
|
|
|
|
2022-11-19 01:21:28 +00:00
|
|
|
#ifndef GAMESTRUCTS_HEADER
|
|
|
|
#define GAMESTRUCTS_HEADER
|
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;
|
2022-11-19 01:21:28 +00:00
|
|
|
int hp;
|
2022-07-08 20:00:38 +00:00
|
|
|
Color color;
|
2022-06-17 02:17:26 +00:00
|
|
|
};
|
2022-06-12 17:49:42 +00:00
|
|
|
|
2022-11-19 01:21:28 +00:00
|
|
|
void DamageActor(struct Actor *actor);
|
|
|
|
void UpdateiFrameTimer(struct Actor *actor);
|
|
|
|
bool CheckAttackActivity(struct Attack attack[], int val, int max);
|
2022-07-15 16:59:37 +00:00
|
|
|
|
2022-06-12 17:49:42 +00:00
|
|
|
#endif
|