23 lines
420 B
C#
23 lines
420 B
C#
using System;
|
|
|
|
namespace FlappyBird.Core
|
|
{
|
|
public class GameStartNotifier : IGameStartNotifier
|
|
{
|
|
public bool HasStarted { get; private set; }
|
|
|
|
public event Action OnGameStarted;
|
|
|
|
public void NotifyGameStarted()
|
|
{
|
|
if (HasStarted)
|
|
{
|
|
return;
|
|
}
|
|
|
|
HasStarted = true;
|
|
OnGameStarted?.Invoke();
|
|
}
|
|
}
|
|
}
|