Exemplo n.º 1
0
 public void Shake(AttackBehavior attack)
 {
     if (shakeCoroutine != null)
         StopCoroutine(shakeCoroutine);
     shakeCoroutine = ShakeSpriteCoroutine(attack.TargetShakePower, attack.HitStop);
     StartCoroutine(shakeCoroutine);
 }
Exemplo n.º 2
0
        public int TakeDamage(AttackBehavior attack)
        {
            int finalDamage = 0;
            int rawDamage = 0;




            finalDamage = attack.AttackDamage;
            currentHP -= finalDamage;
            currentHP = Mathf.Clamp(currentHP, 0, GetHPMax());
            return finalDamage;
        }
 public void ApplyFeedback(AttackBehavior attack)
 {
     if(attack.HitStop > 0 && attack.HitStopGlobal == true)
     {
         SetBattleMotionSpeed(0, attack.HitStop);
     }
     if (attack.ShakeScreen > 0)
     {
         cameraShake.ShakeEffect(attack.ShakeScreen, (int)attack.ShakeScreenTime);
     }
     if (attack.Zoom > 0)
     {
         zoom.SetTrigger("Zoom");
     }
 }
Exemplo n.º 4
0
 public void AttackFeedback(AttackBehavior attack)
 {
     battleFeedbackManager.ApplyFeedback(attack);
 }