Ejemplo n.º 1
0
        public static UnitAnim GetUnitAnim(UnitAnimType animType, int angle)
        {
            AnimDir animDir = GetAnimDirFromAngle(angle);

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

            UpdateAnim(animType, angle, frameRateMod);
        }