public IPhase ChangePhase(Situation situation, IPhase phase) { var oldPhase = _phaseStack.Pop(); oldPhase.Exit(situation); _phaseStack.Push(phase); phase.Start(situation); return oldPhase; }
public void SupersedePhase(IPhase newPhase) { Clock.Stop(); CurrentPhase.SupersededBy = newPhase; newPhase.Supersedes = CurrentPhase; CurrentPhase.Pause(); CurrentPhase = newPhase; CurrentPhase.Start(); Clock.Start(CurrentPhase.Duration); }
public void StartPhase(Situation situation, IPhase phase) { _phaseStack.Push(phase); phase.Start(situation); }
public void SetPhase(IPhase phase) { Log.Verbose("Set Phase: " + phase.GetName() + "(" + phase.GetParent() + ")", "Game"); _phase = phase; _phase.Start(); }