delegates and other fun things

This commit is contained in:
2026-03-25 12:04:12 +01:00
parent c37d657bd0
commit 6f4184983d

View File

@@ -4,17 +4,15 @@ namespace PeopleVille
{
public class GameManager
{
List<Store> Stores { get; set; }
public delegate void TickHandler();
public event TickHandler TickDone;
public async Task StartClock()
{
var res = 0;
while (true)
{
Console.WriteLine($"{res}");
res++;
// Do something
TickDone.Invoke();
await Task.Delay(500);
}
}