public TutorialExplanationGameState(Lobby lobby) : base( lobby: lobby, exit: new WaitForUsers_StateExit(lobby: lobby, usersToWaitFor: WaitForUsersType.Active, waitingPromptGenerator: WaitingPromptGenerator(lobby)) ) { Arg.NotNull(lobby, nameof(lobby)); UserState readyUp = new SimplePromptUserState(promptGenerator: this.ReadyUpPrompt); this.Entrance.Transition(readyUp); readyUp.Transition(this.Exit); // I have created a monstrosity. this.Legacy_UnityView = new Legacy_UnityView(this.Lobby) { ScreenId = new StaticAccessor <TVScreenId> { Value = TVScreenId.WaitForUserInputs }, Instructions = new StaticAccessor <string> { Value = "Press 'READY!' once you have read the instructions!" }, }; }
/// <summary> /// Initializes a new <see cref="WaitForTrigger_StateExit"/>. /// </summary> /// <param name="waitingPromptGenerator">The prompt generator to use while waiting for the trigger. The outlet of this state will be overwritten</param> public WaitForTrigger_StateExit(Func <User, UserPrompt> waitingPromptGenerator = null) : base() { this.WaitingState = new SimplePromptUserState(promptGenerator: waitingPromptGenerator ?? Prompts.DisplayText()); this.WaitingState.AddPerUserEntranceListener((User user) => this.InvokeEntranceListeners(user)); }