Building out Golf Level and mission states and improved AI

This commit is contained in:
2026-09-01 16:33:49 +01:00
parent 04047ddf57
commit 5f76d7b002
63 changed files with 102312 additions and 1834 deletions

View File

@@ -138,9 +138,20 @@ public class CarHealth : MonoBehaviour
Debug.Log($"<b>{gameObject.name}</b> took <color=orange>{amount:F1}</color> damage! Health: {currentHealth:F1}");
// --- GAME MANAGER HOOKS FOR PLAYER ---
if (gameObject.CompareTag("Player") && GameManager.Instance != null)
{
GameManager.Instance.OnPlayerHit(amount);
}
if (currentHealth <= 0f)
{
DestroyCar();
if (gameObject.CompareTag("Player") && GameManager.Instance != null)
{
GameManager.Instance.GameOver();
}
}
}