void HandleOnImpulsePlay(AnimImpulse obj)
        {
            switch (obj)
            {

            }
        }
Example #2
0
 public void ApplyImpulse(AnimImpulse animImpulse, int rate = 0)
 {
     if (Animator.IsNotNull())
     {
         Animator.ApplyImpulse(animImpulse, rate);
     }
 }
Example #3
0
 public void ApplyImpulse(AnimImpulse animImpulse)
 {
     if (Animator.IsNotNull())
     {
         Animator.ApplyImpulse(animImpulse);
     }
 }
 public virtual void Play(AnimImpulse impulse, int rate = 0)
 {
     if (OnImpulsePlay.IsNotNull())
     {
         OnImpulsePlay(impulse, rate);
     }
 }
 public void ApplyImpulse(AnimImpulse animImpulse, double speed = 1d)
 {
     if (onImpulsePlay.IsNotNull())
     {
         onImpulsePlay(animImpulse);
     }
     OnApplyImpulse(animImpulse, speed);
 }
 public string GetImpulseName(AnimImpulse impulse)
 {
     switch (impulse)
     {
     case AnimImpulse.Fire:
         return(fire);
     }
     return(idling);
 }
 private AnimationClip GetImpulseClip(AnimImpulse impulse)
 {
     switch (impulse)
     {
     case AnimImpulse.Fire:
         return(fireClip);
     }
     return(idlingClip);
 }
        protected override void OnApplyImpulse(AnimImpulse animImpulse, double speed)
        {
            string animation = GetImpulseState(animImpulse);

            if (!string.IsNullOrEmpty(animation))
            {
                animator.Play(animation, -1, 0f);
            }
        }
 protected override void OnApplyImpulse(AnimImpulse animImpulse, double speed)
 {
     if (CanAnimate)
     {
         AnimationClip clip = GetImpulseClip(animImpulse);
         if (clip.IsNotNull())
         {
             animator.Play(clip.name, PlayMode.StopSameLayer);
         }
     }
 }
Example #10
0
        private AnimationClip GetImpulseClip(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(fireClip);

            case AnimImpulse.SpecialAttack:
                return(specialAttackClip);
            }
            return(idlingClip);
        }
Example #11
0
        public string GetImpulseName(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(fire);

            case AnimImpulse.SpecialAttack:
                return(specialAttack);
            }
            return(idling);
        }
Example #12
0
        public override void Play(AnimImpulse impulse, int rate = 0)
        {
            base.Play(impulse, rate);

            if (CanAnimate)
            {
                AnimationClip clip = GetImpulseClip(impulse);
                if (clip.IsNotNull())
                {
                    animator.Blend(clip.name);
                }
            }
        }
 public void Play(AnimImpulse impulse)
 {
     if (OnImpulsePlay.IsNotNull())
     {
         OnImpulsePlay(impulse);
     }
     if (CanAnimate)
     {
         AnimationClip clip = GetImpulseClip(impulse);
         if (clip.IsNotNull())
         {
             animator.CrossFade(clip.name);
         }
     }
 }
Example #14
0
        public virtual void Play(AnimImpulse impulse, int rate = 0)
        {
            if (OnImpulsePlay.IsNotNull())
            {
                OnImpulsePlay(impulse, rate);
            }

            if (CanAnimate)
            {
                AnimationClip clip = GetImpulseClip(impulse);
                if (clip.IsNotNull())
                {
                    //animator.Blend(clip.name,.8f,fadeLength);
                    animator.Play(clip.name);
                }
            }
        }
        private string GetImpulseState(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(_fire);

            case AnimImpulse.SpecialFire:
                return(_specialFire);

            case AnimImpulse.SpecialAttack:
                return(_specialAttack);

            case AnimImpulse.Extra:
                return(_extra);
            }
            return(_idling);
        }
Example #16
0
        protected override AnimationClip GetImpulseClip(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(fireClip);

            case AnimImpulse.SpecialFire:
                return(specialFireClip);

            case AnimImpulse.SpecialAttack:
                return(specialAttackClip);

            case AnimImpulse.Extra:
                return(extraClip);
            }
            return(idlingClip);
        }
Example #17
0
        protected override string GetImpulseName(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(fire);

            case AnimImpulse.SpecialFire:
                return(specialFire);

            case AnimImpulse.SpecialAttack:
                return(specialAttack);

            case AnimImpulse.Extra:
                return(extra);
            }
            return(idling);
        }
 public void Play(AnimImpulse impulse)
 {
     if (OnImpulsePlay .IsNotNull ())
         OnImpulsePlay (impulse);
     if (CanAnimate) {
         AnimationClip clip = GetImpulseClip (impulse);
         if (clip .IsNotNull ())
         {
             animator.CrossFade (clip.name);
         }
     }
 }
        private AnimationClip GetImpulseClip(AnimImpulse impulse)
        {
            switch (impulse) {
            case AnimImpulse.Fire:
                return fireClip;

            }
            return idlingClip;
        }
 public void ApplyImpulse(AnimImpulse impulse)
 {
     Play(impulse);
 }
 public void ApplyImpulse(AnimImpulse impulse)
 {
     Play(impulse);
 }
        public string GetImpulseName(AnimImpulse impulse)
        {
            switch (impulse) {
            case AnimImpulse.Fire:
                return fire;

            }
            return idling;
        }
 void HandleOnImpulsePlay(AnimImpulse obj)
 {
     switch (obj)
     {
     }
 }
Example #24
0
 protected virtual AnimationClip GetImpulseClip(AnimImpulse impulse)
 {
     return(null);
 }
 void HandleOnImpulsePlay(AnimImpulse obj, int rate)
 {
 }
Example #26
0
 protected virtual string GetImpulseName(AnimImpulse impulse)
 {
     return(null);
 }
 void HandleOnImpulsePlay(AnimImpulse obj)
 {
 }
Example #28
0
 public virtual void ApplyImpulse(AnimImpulse animImpulse, int rate = 0)
 {
     Play(animImpulse, rate);
 }
 protected abstract void OnApplyImpulse(AnimImpulse animImpulse, double speed);