36 lines
785 B
C
36 lines
785 B
C
#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
|