Corrected walk animation name and frames.
This commit is contained in:
parent
54604db0c7
commit
dfd1811009
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#define PLAYER_DEFAULT_SPEED 80.0f // px / s
|
#define PLAYER_DEFAULT_SPEED 80.0f // px / s
|
||||||
#define PLAYER_DEFAULT_IDLE_ANIMATION_SPEED 250.0f // ms / frame
|
#define PLAYER_DEFAULT_IDLE_ANIMATION_SPEED 250.0f // ms / frame
|
||||||
#define PLAYER_DEFAULT_RUN_ANIMATION_SPEED 160.0f // ms / frame
|
#define PLAYER_DEFAULT_WALK_ANIMATION_SPEED 160.0f // ms / frame
|
||||||
|
|
||||||
typedef enum player_state_t {
|
typedef enum player_state_t {
|
||||||
PLAYER_IDLE = 0x00, // 00000000
|
PLAYER_IDLE = 0x00, // 00000000
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,8 @@ static inline void player_system_set_animation(player_system_data_t *system_data
|
||||||
|
|
||||||
if((system_data->state & PLAYER_RUNNING) && !(system_data->last_state & PLAYER_RUNNING))
|
if((system_data->state & PLAYER_RUNNING) && !(system_data->last_state & PLAYER_RUNNING))
|
||||||
{
|
{
|
||||||
animation_system_data->frame_delay_ms = PLAYER_DEFAULT_RUN_ANIMATION_SPEED;
|
animation_system_data->frame_delay_ms = PLAYER_DEFAULT_WALK_ANIMATION_SPEED;
|
||||||
animation_system_change_animation(animation_system_data, "player_run_sheet", 6);
|
animation_system_change_animation(animation_system_data, "player_walk_sheet", 4);
|
||||||
}
|
}
|
||||||
else if(!(system_data->state & PLAYER_RUNNING) && (system_data->last_state & PLAYER_RUNNING))
|
else if(!(system_data->state & PLAYER_RUNNING) && (system_data->last_state & PLAYER_RUNNING))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue