Beispiel #1
0
        public static void SetTrigger(this DAnimatorComponent self, string name)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetTrigger(name);
        }
Beispiel #2
0
        public static void SetIntValue(this DAnimatorComponent self, string name, int value)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetInteger(name, value);
        }
Beispiel #3
0
        public static void SetBoolValue(this DAnimatorComponent self, string name, bool state)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetBool(name, state);
        }
Beispiel #4
0
        public static void SetFloatValue(this DAnimatorComponent self, string name, float state)
        {
            if (!self.HasParameter(name))
            {
                return;
            }

            self.Animator.SetFloat(name, state);
        }
Beispiel #5
0
 public static void Play(this DAnimatorComponent self, DMotionType motionType, float motionSpeed = 1f)
 {
     if (!self.HasParameter(motionType.ToString()))
     {
         return;
     }
     self.MotionType   = motionType;
     self.MontionSpeed = motionSpeed;
 }