diff options
| author | schererleander <leander@schererleander.de> | 2026-03-10 02:58:58 +0100 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2026-03-10 02:58:58 +0100 |
| commit | e32c1eeed3427832b40d1e9f43a17dbec8cb56ae (patch) | |
| tree | c0857fa0435f41004ca7132c60430ccbf2904ce4 /include | |
| parent | d7855a2b93be4aa1008643e54249cb739986869e (diff) | |
feat(fairy): implement fairy with wandering logic
Diffstat (limited to 'include')
| -rw-r--r-- | include/fairy.h | 18 | ||||
| -rw-r--r-- | include/player.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/fairy.h b/include/fairy.h new file mode 100644 index 0000000..cdead11 --- /dev/null +++ b/include/fairy.h @@ -0,0 +1,18 @@ +#ifndef FAIRY_H +#define FAIRY_H + +#include "raylib.h" + + +typedef struct Fairy { + Vector2 position; + Vector2 targetOffset; + Vector2 targetWorld; + + float wandTimer; +} Fairy; + +void UpdateFairy(Fairy *Fairy, Vector2 playerWorldPosition); +void DrawFairy(Fairy *Fairy); + +#endif // FAIRY_H diff --git a/include/player.h b/include/player.h index 0c9799b..f77de50 100644 --- a/include/player.h +++ b/include/player.h @@ -15,6 +15,7 @@ typedef struct Player { float frameTime; int state; // 0: idle, 1: walk, etc. bool facingRight; + } Player; void UpdatePlayer(Player *p, MapManager *mapMgr); |
