using UnityEngine; public class CustomerPayment : MonoBehaviour { public float moneyAvailable = 10f; public bool CanAfford(float price) { return moneyAvailable >= price; } public void Pay(float amount) { if (CanAfford(amount)) { moneyAvailable -= amount; Debug.Log($"💸 Customer pays £{amount}."); } else { Debug.Log("🚨 Not enough money! Customer walks away."); } } }