implement new animation helper

This commit is contained in:
Tuomas Katajisto 2025-11-02 10:07:54 +02:00
parent 6f5f9fe409
commit c85d878459

View File

@ -33,6 +33,12 @@ animation_draw :: (player: *Animation_Player, position: Vector3, flipX: bool = f
animation_set :: (player: *Animation_Player, animation: string) {
player.current_frame = 0;
player.current_animation = table_find_pointer(*g_animations, animation);
}
animation_set_if_not :: (player: *Animation_Player, animation: string) {
if !animation_is(player, animation) {
animation_set(player, animation);
}
}
animation_is :: (player: *Animation_Player, animation: string) -> bool {