refactor: player as singleton

This commit is contained in:
huaqo-games
2025-11-06 11:50:20 +01:00
parent dbac58eda8
commit cc53a19fd5
3 changed files with 25 additions and 17 deletions
+4 -4
View File
@@ -171,7 +171,6 @@ typedef struct
Soundtrack soundtracks[SOUNDTRACK_COUNT];
RenderTexture2D target;
Floor floor;
Player player;
Birds birds;
Islands islands;
Mouse mouse;
@@ -230,9 +229,10 @@ void RenderFloor(Floor *floor);
void UnloadFloor(Floor *floor);
playerSpeedID GetPlayerSpeedID(float speed);
Player CreatePlayer(void);
void UpdatePlayer(Player *player);
void RenderPlayer(Player *player);
Player* GetPlayer(void);
void CreatePlayer(void);
void UpdatePlayer(void);
void RenderPlayer(void);
Birds CreateBirds(void);
void UpdateBirds(Birds *birds);