public void Exist() { var quitAction = new QuitAction(); var engine = new TextAdventureEngine(new NormalLocation(), DirectionCalculator.North); quitAction.Execute(engine, new[] { "quit" }); Assert.Equal(TextAdventureEngine.States.Terminating, engine.CurrentState); }
void BeginQuitingWithAction(QuitAction action) { onQuitAction = action; if (darkeningImage) { darkeningImage.gameObject.SetActive(true); } needsQuit = true; }
/// <summary>Set the action to call from quit().</summary> /// <remarks>Set the action to call from quit().</remarks> public virtual void InitQuitAction(QuitAction quitAction) { if (quitAction == null) { throw new ArgumentException("quitAction is null"); } if (this.quitAction != null) { throw new ArgumentException("The method is once-call."); } this.quitAction = quitAction; }