public void PlayAnim(UnitAnimType animType, Vector3 dir, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { int angle = GetAngleFromVector(dir); PlayAnim(animType, angle, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); }
public void PlayAnim(UnitAnimType animType, int angle, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { // Ignores if same animType, same angle and same frameRateMod // 8 angles if (animType == activeAnimType && activeAngle == angle) { // Same anim, same angle return; } else { if (animType != activeAnimType) { // Different anim, same angle } else { // Different angle, same anim } } PlayAnimForced(animType, angle, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); }
public void PlayAnim(UnitAnimType animType, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { PlayAnim(animType, activeAngle, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); }
public void ClearOnAnimInterruptedIfMatches(V_UnitSkeleton.OnAnimInterrupted OnAnimInterrupted) { unitSkeleton.ClearOnAnimInterruptedIfMatches(OnAnimInterrupted); }
public void UpdateAnim(UnitAnimType animType, int angle, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { // Update animation if different angle if (animType == activeAnimType) { // Same anim, check angle if (activeAngle == angle) { // Same angle, ignore return; } else { // Different angle activeAngle = angle; UnitAnim unitAnim = activeAnimType.GetUnitAnim(activeAngle); activeAnim = unitAnim; unitSkeleton.PlayAnimContinueFrames(unitAnim, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); } } else { // Different anim PlayAnim(animType, angle, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); } }
public void PlayAnimForced(UnitAnim unitAnim, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { // Forcefully play animation no matter what is currently playing activeAnimType = unitAnim.GetUnitAnimType(); activeAnim = unitAnim; unitSkeleton.PlayAnim(unitAnim, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); }
public void PlayAnim(UnitAnim unitAnim, float frameRateMod, V_UnitSkeleton.OnAnimComplete onAnimComplete, V_UnitSkeleton.OnAnimTrigger onAnimTrigger, V_UnitSkeleton.OnAnimInterrupted onAnimInterrupted) { // Ignores if same animType, same angle and same frameRateMod if (unitAnim == activeAnim) { // Same anim, same angle return; } PlayAnimForced(unitAnim, frameRateMod, onAnimComplete, onAnimTrigger, onAnimInterrupted); }