Avoid/src/Gstructs.h

47 lines
808 B
C
Raw Permalink Normal View History

/*
- Avoid ~ a game by Canneddonuts
2022-11-19 01:21:28 +00:00
- Filename ~ Gstructs.h
- 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 {
float speed;
int hp;
int currentframe;
2022-08-22 19:16:28 +00:00
float iframetimer;
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-17 02:17:26 +00:00
struct Item {
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-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);
#endif