Compare commits

..

No commits in common. "3060f2910c3a54d2b3ffb9429943eeb37bd30f27" and "d214571ef9187cb65de0224c0b3f063203f60dd0" have entirely different histories.

2 changed files with 9 additions and 9 deletions

View File

@ -42,14 +42,14 @@ void animation_system_update(component_t *component)
system_data->actual_frame = system_data->actual_frame->prev;
system_data->actual_frame_nb--;
}
else if(system_data->loop)
else if(!system_data->loop)
{
system_data->actual_frame = system_data->frames.last;
system_data->actual_frame_nb = system_data->frames.size - 1;
system_data->play = false;
}
else
{
system_data->play = false;
system_data->actual_frame = system_data->frames.last;
system_data->actual_frame_nb = system_data->frames.size - 1;
}
}
else
@ -59,14 +59,14 @@ void animation_system_update(component_t *component)
system_data->actual_frame = system_data->actual_frame->next;
system_data->actual_frame_nb++;
}
else if(system_data->loop)
else if(!system_data->loop)
{
system_data->actual_frame = system_data->frames.first;
system_data->actual_frame_nb = 0;
system_data->play = false;
}
else
{
system_data->play = false;
system_data->actual_frame = system_data->frames.first;
system_data->actual_frame_nb = 0;
}
}
}

View File

@ -7,7 +7,7 @@
#include "animation_system.h"
#define PLAYER_DEFAULT_SPEED 80.0f // px / s
#define PLAYER_DEFAULT_IDLE_ANIMATION_SPEED 500.0f // ms / frame
#define PLAYER_DEFAULT_IDLE_ANIMATION_SPEED 250.0f // ms / frame
#define PLAYER_DEFAULT_WALK_ANIMATION_SPEED 160.0f // ms / frame
typedef enum player_state_t {