Beispiel #1
0
        public IEnumerator TriggerHitAnimation(bool isPlayer, Effectiveness effectiveness)
        {
            AnimatorWrapper animator = isPlayer ? PlayerStatusAnimator : OpponentStatusAnimator;

            return(animator.TriggerAndWait("Attack"));

            switch (effectiveness)
            {
            case Effectiveness.Ineffective:
                SoundEffectManager.Inst.PlaySoundImmediate("Boing");
                break;

            case Effectiveness.VeryWeak:
            case Effectiveness.Weak:
                SoundEffectManager.Inst.PlaySoundImmediate("PlayerAttackWeak");
                break;

            case Effectiveness.Strong:
            case Effectiveness.VeryStrong:
                SoundEffectManager.Inst.PlaySoundImmediate("PlayerAttackStrong");
                break;

            case Effectiveness.Average:
            default:
                SoundEffectManager.Inst.PlaySoundImmediate("PlayerAttack");
                break;
            }
        }
Beispiel #2
0
        public IEnumerator DeltAnimation(string animationKey, bool isPlayer)
        {
            AnimatorWrapper animator = isPlayer ? PlayerStatusAnimator : OpponentStatusAnimator;

            yield return(animator.TriggerAndWait(animationKey));

            BattleManager.AddToBattleQueue(action: () => SoundEffectManager.Inst.PlaySoundImmediate(animationKey));
        }
Beispiel #3
0
        public IEnumerator ChangeDeltStatus(bool isPlayer, statusType status)
        {
            string          statusKey = status.ToString();
            AnimatorWrapper animator  = isPlayer ? PlayerStatusAnimator : OpponentStatusAnimator;

            yield return(animator.TriggerAndWait(statusKey));

            SoundEffectManager.Inst.PlaySoundImmediate(statusKey);
            //REFACTOR_TODO: Have animation use callback to SetDeltStatusSprite
        }
Beispiel #4
0
 public IEnumerator BallRattles(int ballRattles)
 {
     return(OpponentStatusAnimator.TriggerAndWait("BallRattles", ballRattles));
 }
Beispiel #5
0
        public IEnumerator DeltHurt(bool isPlayer)
        {
            AnimatorWrapper slideAnimator = isPlayer ? PlayerAttackAndSlideAnimator : OpponentAttackAndSlideAnimator;

            return(slideAnimator.TriggerAndWait("Hurt"));
        }