mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:20:07 +08:00
19 lines
298 B
C#
19 lines
298 B
C#
using UnityEngine;
|
|
|
|
public class TimerComponent : MonoBehaviour
|
|
{
|
|
public BasicCounter Counter = new BasicCounter();
|
|
public float Timer = 1f;
|
|
|
|
void Update()
|
|
{
|
|
Timer -= Time.deltaTime;
|
|
|
|
if (Timer > 0)
|
|
return;
|
|
|
|
Counter.Increment();
|
|
Timer = 1f;
|
|
}
|
|
}
|