public void SetAnimation(int index) { if (!untilFinished && !untilTick) { if (index != current_animation_index) { current_animation_index = index; current_animation = animations[index]; current_animation.Play(); CheckHitbox(); } } }
public void SetSyncAnimation(int index) { if (!untilFinished && !untilTick) { if (index != current_animation_index) { int ani_pos = current_animation.Counter; current_animation_index = index; current_animation = animations[index]; current_animation.Play(); //set the new animations counter to the old (to sync it up) current_animation.Counter = ani_pos; CheckHitbox(); } } }
public void StartAnimation(int index) { if (!untilFinished && !untilTick) { current_animation_index = index; current_animation = animations[index]; current_animation.Play(); } }