public void GoToNextConversation() { CurrentConversation.Reset(); if (currentConversationNumber >= conversationList.Count) { throw new IndexOutOfRangeException("There is no conversation left, although you are trying to make one."); //There are no conversations left } //if the conversation is finished, start up the next event if (prevPlaying) //conversation came from playingstate { GameEnvironment.GameStateManager.SwitchTo("playingState"); } else if (!prevPlaying) //conversation came from a cutsceneState { CurrentConversation.Reset(); //load next cutscene for next time it starts. (GameEnvironment.GameStateManager.GetGameState("cutscene") as CutsceneState).GoToNextCutscene(); //depending on which cutscene just completed, switch to the next cutscene or the next playingstate switch (currentConversationNumber) { //after the ThroneRoom2 scene, the players play the game case (int)Conversationnames.ThroneRoom2: GameEnvironment.GameStateManager.SwitchTo("playingState"); break; default: GameEnvironment.GameStateManager.SwitchTo("cutscene"); break; } } currentConversationNumber++; }
public void Reset() { CurrentConversation.Reset(); }