This function is used to change the used animation with the animator.
void dg_animator_set_animation(dg_animator_t *animator, char *key);
dg_animator_set_animation(animator, "walk");
void dg_animator_set_animation(dg_animator_t *animator, char *key)
{
int index = 0;
for (int i = 0; i < animator->length; i++) {
if (!dg_strcmp(animator->keys[i], key))
index = i;
}
animator->current = index;
}