Initial Commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user