protected void OnShowDialog(ShowDialogMessage message) { //set up the state of the manager, and game model _currentMessage = message; _originalState = GameModel.Instance.State; DialogModel.Instance.DialogData = message.Model; GameModel.Instance.State = _originalState | GameState.InDialog; }
protected void AdvanceDialog() { //try to advance the dialog message, and see if it returns if it is done if (_currentMessage.Model.AdvanceDialogMessage()) { //we're advancing page, but there are no more pages. close the dialog GameModel.Instance.State = _originalState; //also, clean up, so we don't have any messages being displayed the next time the dialog opens _currentMessage.Model.Reset(); _currentMessage = null; DialogModel.Instance.DialogData = null; } }