public void StopDialog() { _dialogFrameText.text = ""; _dialogFrame.SetActive(false); _caller.UnstackDialog(); if (_dialogXML.postAction != null) { ExecutePostAction(_dialogXML.postAction); } _dialogXML = null; dialogStarted = false; _caller.talking = false; _caller.FinishedDialog(); _caller = null; GameManager.instance.UnstackGameMode(GameModes.DIALOG_MODE); }
private void StartDialog(string path)//On a besoin du caller pour unstack dialog avant d'exécuter la dialogPostAction { GameManager.instance.StackGameMode(GameModes.DIALOG_MODE); dialogStarted = true; _dialogFrame.SetActive(true); _index = 0; TextAsset asset = Resources.Load(_dialogFolderPath + path) as TextAsset; Stream stream = new MemoryStream(asset.bytes); XmlSerializer serializer = new XmlSerializer(typeof(DialogXML)); _dialogXML = serializer.Deserialize(stream) as DialogXML; stream.Close(); NextDialog(); }