Batch 1 - Scripts

This commit is contained in:
Rohan
2026-07-21 08:58:18 +05:30
parent 604c0c786a
commit 1dcd8bf80b
41 changed files with 655 additions and 13 deletions

View File

@@ -29,6 +29,13 @@ public class Vault : MonoBehaviour
currentPlayer = player;
currentCashManager = other.GetComponent<CashManager>();
// Player must deposit before opening another vault
if (currentCashManager != null && currentCashManager.currentCash >= vaultCash)
{
UI_Manager.Instance?.ShowInteractionPrompt("Deposit your cash before opening another vault.");
return;
}
playerInside = true;
MobileInteractButton.Instance?.Show();
@@ -36,7 +43,7 @@ public class Vault : MonoBehaviour
if (!isBeingOpened)
{
UI_Manager.Instance?.ShowInteractionPrompt("Press F To Open Vault");
UI_Manager.Instance?.ShowInteractionPrompt("Press the interaction button to open vault.");
}
}
@@ -79,6 +86,12 @@ public class Vault : MonoBehaviour
isBeingOpened)
return;
if (currentCashManager.currentCash >= vaultCash)
{
UI_Manager.Instance?.ShowInteractionPrompt("Deposit your cash before opening another vault.");
return;
}
UI_Manager.Instance?.HideActionTimer();
isBeingOpened = true;