Ashby Issac 0bace59e6d Car movement and camera changes.
Integrated custom car movements and fixed issues with follow camera behaviours.
2026-01-05 13:34:57 +05:30

32 lines
773 B
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class LevelManager
{
private TextMeshProUGUI gameOverText;
private GameObject gameOverPanel;
public LevelManager(TextMeshProUGUI gameOverText, GameObject gameOverPanel)
{
this.gameOverText = gameOverText;
this.gameOverPanel = gameOverPanel;
GameplayController.Instance.OnGameOver += LevelEndPanel;
}
/*
* Activate GameOver Panel when car has: fallen off,
* or when level's complete or when time has run out
*/
private void LevelEndPanel(string text)
{
//if (isGameOver) return;
gameOverText.text = text;
gameOverPanel.SetActive(true);
//isGameOver = true;
}
}