Пример #1
0
        public static void SetTrigger(this AnimatorComponent self, string name)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetTrigger(name);
        }
Пример #2
0
        public static void SetIntValue(this AnimatorComponent self, string name, int value)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetInteger(name, value);
        }
Пример #3
0
        public static void SetBoolValue(this AnimatorComponent self, string name, bool state)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetBool(name, state);
        }
Пример #4
0
        public static void SetFloatValue(this AnimatorComponent self, string name, float state)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetFloat(name, state);
        }
Пример #5
0
 public static void Play(this AnimatorComponent self, MotionType motionType, float motionSpeed = 1f)
 {
     if (!self.HasParameter(motionType.ToString()))
     {
         return;
     }
     self.MotionType   = motionType;
     self.MontionSpeed = motionSpeed;
 }