Better lisibility for animation system update func.
This commit is contained in:
parent
d214571ef9
commit
145ea71bd9
|
|
@ -42,15 +42,15 @@ void animation_system_update(component_t *component)
|
||||||
system_data->actual_frame = system_data->actual_frame->prev;
|
system_data->actual_frame = system_data->actual_frame->prev;
|
||||||
system_data->actual_frame_nb--;
|
system_data->actual_frame_nb--;
|
||||||
}
|
}
|
||||||
else if(!system_data->loop)
|
else if(system_data->loop)
|
||||||
{
|
|
||||||
system_data->play = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
system_data->actual_frame = system_data->frames.last;
|
system_data->actual_frame = system_data->frames.last;
|
||||||
system_data->actual_frame_nb = system_data->frames.size - 1;
|
system_data->actual_frame_nb = system_data->frames.size - 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
system_data->play = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -59,15 +59,15 @@ void animation_system_update(component_t *component)
|
||||||
system_data->actual_frame = system_data->actual_frame->next;
|
system_data->actual_frame = system_data->actual_frame->next;
|
||||||
system_data->actual_frame_nb++;
|
system_data->actual_frame_nb++;
|
||||||
}
|
}
|
||||||
else if(!system_data->loop)
|
else if(system_data->loop)
|
||||||
{
|
|
||||||
system_data->play = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
system_data->actual_frame = system_data->frames.first;
|
system_data->actual_frame = system_data->frames.first;
|
||||||
system_data->actual_frame_nb = 0;
|
system_data->actual_frame_nb = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
system_data->play = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue