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

            return(animType.GetUnitAnim(animDir));
        }
示例#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);
        }
示例#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;
            }
        }
示例#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);
 }
示例#5
0
        public void UpdateAnim(UnitAnimType animType, Vector3 dir, float frameRateMod)
        {
            int angle = GetAngleFromVector(dir);

            UpdateAnim(animType, angle, frameRateMod);
        }