refactor: header file for every module
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef PLAYER_H
|
||||
#define PLAYER_H
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
#include "engineAnimation.h"
|
||||
#include "engineConfig.h"
|
||||
#include "enginePhysics.h"
|
||||
#include "engineSprite.h"
|
||||
#include "terrain.h"
|
||||
#include "wake.h"
|
||||
|
||||
typedef enum { START_SHIP, PLAYER_TEX_COUNT } PlayerTextureID;
|
||||
typedef enum { ANCHOR, SLOW_AHEAD, FAST_AHEAD, SPEED_COUNT } PlayerSpeedID;
|
||||
|
||||
typedef struct {
|
||||
Sprite sprite;
|
||||
Animation animation;
|
||||
Physics physics;
|
||||
float rotation;
|
||||
Sound soundFlapping;
|
||||
Config config;
|
||||
int health;
|
||||
int gold;
|
||||
WakeTrail wakeTrail;
|
||||
} Player;
|
||||
|
||||
PlayerSpeedID GetPlayerSpeedID(float speed);
|
||||
Player CreatePlayer(Terrain *terrain);
|
||||
void UpdatePlayer(Player *player);
|
||||
void RenderPlayer(Player *player);
|
||||
void SavePlayer(Player *player);
|
||||
void ResetPlayer(Player *player, Terrain *terrain);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user