WUT_Computer_Science/The project/Assets/Scripts/TickSystem/ExampleTickReceiver.cs
Gabriel Ksawery Skowron-Rodriguez 98112df4a5 added TickSystem and an example tick receiver
+ basic TickSystem fully working:
++ add it to a scene for ticks to happen

+ ExampleTickReceiver reference monobehaviour
++ so everyone knows how to connect to the system
2022-05-16 13:34:11 +02:00

17 lines
361 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ExampleTickReceiver : MonoBehaviour
{
void Awake()
{
TickSystem.OnTick += HandleTick;
}
private void HandleTick(TickSystem.OnTickEventArgs tickEventArgs)
{
Debug.Log($"Example of tick #{tickEventArgs.tickNumber} being handled");
}
}