From aee015da150d40a613d238d300836d82abe2cbb8 Mon Sep 17 00:00:00 2001
From: reynull <13519045@std.stei.itb.ac.id>
Date: Sun, 16 Apr 2023 09:29:24 +0700
Subject: [PATCH] fix decrease money bug

---
 Assets/Scripts/Shop/NewUI/ShopUIController.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/Shop/NewUI/ShopUIController.cs b/Assets/Scripts/Shop/NewUI/ShopUIController.cs
index 262fae82..451dce78 100644
--- a/Assets/Scripts/Shop/NewUI/ShopUIController.cs
+++ b/Assets/Scripts/Shop/NewUI/ShopUIController.cs
@@ -71,7 +71,8 @@ public class ShopUIController : MonoBehaviour
             currency.style.color = Color.red;
         }
 
-        currentMoney = result;
+        playerMoney.AddMoney(-targetAmount);
+        currentMoney = playerMoney.GetMoney();
         money.text = currentMoney.ToString();
         return true;
     }
-- 
GitLab