public void TimerTick(ClickInfo clickInfo) { ClickInfo = clickInfo; if (_currentPhaseTask == null) { return; } if (_currentPhaseTask.IsComplete) { var nextPhaseKind = _currentPhaseTask.EndTask(); _currentPhaseTask = nextPhaseKind; _currentPhaseTask.StartTask(); } else { _currentPhaseTask.DoTimerTick(); } }
public void SetTask(IPhaseTask task) { _currentPhaseTask = task; _currentPhaseTask.StartTask(); }
public PhaseManager() { _currentPhaseTask = new StartNewGamePhase(); ClickInfo = null; }