using System.Collections; using System.Collections.Generic; using UnityEngine; namespace KairoEngine.Core { public class TimeTickSystem : MonoBehaviour { public const float TICK_TIMER_MAX = .2f; private int tick; private float tickTimer; private void Awake () => tick = 0; private void Update () { tickTimer += Time.deltaTime; if(tickTimer >= TICK_TIMER_MAX) { tickTimer -= TICK_TIMER_MAX; tick++; // Debug.Log(tick); GenericEvents.Trigger("Tick", tick); } } } }