feat: Player controller
This commit is contained in:
@@ -6,13 +6,25 @@
|
||||
|
||||
#include <SDL3/SDL_events.h>
|
||||
|
||||
#define PLAYER_SPEED 10.0f
|
||||
|
||||
typedef struct ControlState ControlState;
|
||||
struct ControlState {
|
||||
bool rightDown;
|
||||
bool leftDown;
|
||||
bool upDown;
|
||||
bool downDown;
|
||||
};
|
||||
|
||||
typedef struct Player Player;
|
||||
struct Player
|
||||
{
|
||||
V2f pos;
|
||||
U32 bulletsLoaded;
|
||||
ControlState controls;
|
||||
};
|
||||
|
||||
function void PlayerUpdate(SDL_Event *event, Player *player);
|
||||
function void PlayerInput(SDL_Event *event, Player *player);
|
||||
function void PlayerUpdate(F32 delta, Player *player);
|
||||
|
||||
#endif // LD_GAME_PLAYER_H_
|
||||
|
||||
Reference in New Issue
Block a user