From 056c2aa3f0aa44e691cb3ba19cd7ee895a72e217 Mon Sep 17 00:00:00 2001
From: fdavin <fransdavin19@gmail.com>
Date: Sat, 15 Apr 2023 16:04:45 +0700
Subject: [PATCH] feat:shop handle weapon

---
 Assets/Scripts/Shop/ShopManager.cs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Assets/Scripts/Shop/ShopManager.cs b/Assets/Scripts/Shop/ShopManager.cs
index 5dd026f..292dce1 100644
--- a/Assets/Scripts/Shop/ShopManager.cs
+++ b/Assets/Scripts/Shop/ShopManager.cs
@@ -52,6 +52,15 @@ public class ShopManager : MonoBehaviour
             if (i<3 && player.GetComponent<PlayerMovement>().pet != 0){
                 purchaseBtn[i].interactable = false;
             }
+            if (shopItemsSO.ItemsSO[i].title == "Shotgun" && player.GetComponent<PlayerMovement>().shotgun == 1){
+                purchaseBtn[i].interactable = false;
+            }
+            if (shopItemsSO.ItemsSO[i].title == "Sword" && player.GetComponent<PlayerMovement>().sword == 1){
+                purchaseBtn[i].interactable = false;
+            }
+            if (shopItemsSO.ItemsSO[i].title == "Bow" && player.GetComponent<PlayerMovement>().bow == 1){
+                purchaseBtn[i].interactable = false;
+            }
         }
     }
 
-- 
GitLab