Batch 1 - Scripts
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user