start work on microgames

This commit is contained in:
myondev 2026-09-03 08:59:35 -07:00
parent ef733054ef
commit ecff3c6b69
6 changed files with 105 additions and 0 deletions

View file

@ -0,0 +1,37 @@
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()
{
}
}