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

            }
        }
Exemple #2
0
 public void ApplyImpulse(AnimImpulse animImpulse, int rate = 0)
 {
     if (Animator.IsNotNull())
     {
         Animator.ApplyImpulse(animImpulse, rate);
     }
 }
Exemple #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);
         }
     }
 }
        private AnimationClip GetImpulseClip(AnimImpulse impulse)
        {
            switch (impulse)
            {
            case AnimImpulse.Fire:
                return(fireClip);

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

            case AnimImpulse.SpecialAttack:
                return(specialAttack);
            }
            return(idling);
        }
        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);
         }
     }
 }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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)
     {
     }
 }
Exemple #24
0
 protected virtual AnimationClip GetImpulseClip(AnimImpulse impulse)
 {
     return(null);
 }
 void HandleOnImpulsePlay(AnimImpulse obj, int rate)
 {
 }
Exemple #26
0
 protected virtual string GetImpulseName(AnimImpulse impulse)
 {
     return(null);
 }
 void HandleOnImpulsePlay(AnimImpulse obj)
 {
 }
Exemple #28
0
 public virtual void ApplyImpulse(AnimImpulse animImpulse, int rate = 0)
 {
     Play(animImpulse, rate);
 }
 protected abstract void OnApplyImpulse(AnimImpulse animImpulse, double speed);