ReisenTasker/Assets/Scripts/Microgame/MicroGameHandler.cs
2026-09-03 08:59:35 -07:00

37 lines
632 B
C#

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()
{
}
}