Example #1
0
        public static UnitAnim GetUnitAnim(UnitAnimType animType, int angle)
        {
            AnimDir animDir = GetAnimDirFromAngle(angle);

            return(animType.GetUnitAnim(animDir));
        }
Example #2
0
        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);
        }
Example #3
0
        public void PlayAnimIdleIfOnCompleteMatches(Vector3 dir, V_UnitSkeleton.OnAnimComplete OnAnimComplete, UnitAnimType idleAnimType)
        {
            int      angle    = GetAngleFromVector(dir);
            UnitAnim unitAnim = idleAnimType.GetUnitAnim(angle);

            if (unitSkeleton.PlayAnimIfOnCompleteMatches(unitAnim, OnAnimComplete))
            {
                // Playing anim
                activeAnimType = idleAnimType;
                activeAnim     = unitAnim;
                activeAngle    = angle;
            }
        }
Example #4
0
 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);
 }
Example #5
0
        public void UpdateAnim(UnitAnimType animType, Vector3 dir, float frameRateMod)
        {
            int angle = GetAngleFromVector(dir);

            UpdateAnim(animType, angle, frameRateMod);
        }