using System; using UnityEngine; public class MicroGameHandler : MonoBehaviour { public float timeLimit; private float currentTime; public int score; public int minimumScore; public bool loseOnTimeLimit; private void Update() { currentTime -= Time.deltaTime; if (currentTime < 0) { TimeOut(); } } private void TimeOut() { if (loseOnTimeLimit || (minimumScore > 0 && score < minimumScore)) { FailGame(); } } public void FailGame() { } public void WinGame() { } }