A RPG I'm messing with made in Raylib.
1#include "../../include/player_state/run.h"
2
3#include "../../include/player.h"
4#include "../../include/raylib.h"
5
6static void player_state_run_update(PlayerState *state, Player *player)
7{
8 // if (IsKeyPressed(KEY_RIGHT))
9 // {
10 // state->update = player_state_transition_to_walk_right;
11 // }
12}
13
14void player_state_transition_to_run(PlayerState *state, Player *player)
15{
16 state->name = "Run";
17 state->update = player_state_run_update;
18
19 player->speed = 24.0f;
20}