From 909b085b5e46d75c92d7921f67025c41ff316210 Mon Sep 17 00:00:00 2001
From: meyerm1w <moritz.meyerhof@ruhr-uni-bochum.de>
Date: Sun, 18 Apr 2021 18:15:49 +0200
Subject: [PATCH] Arrows deal damage

---
 Assets/Scripts/Fighters/ArrowController.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/Fighters/ArrowController.cs b/Assets/Scripts/Fighters/ArrowController.cs
index a3582c9..51cabf7 100644
--- a/Assets/Scripts/Fighters/ArrowController.cs
+++ b/Assets/Scripts/Fighters/ArrowController.cs
@@ -6,6 +6,7 @@ public class ArrowController : MonoBehaviour
 {
 
     [SerializeField] float speed;
+    [SerializeField] Opponent opponent;
     public int direction;
     Rigidbody2D rb;
 
@@ -24,7 +25,7 @@ public class ArrowController : MonoBehaviour
     {
         if (other.CompareTag("AntiPlayer"))
         {
-            Debug.Log("Got here");
+            other.GetComponent<Fighter>().DealDamage(Mathf.RoundToInt(10 * StatsManager.instance.fighterStats[FighterTypes.ENEMY].damageMultiplier));
             Destroy(gameObject);
         }
     }
-- 
GitLab