public void PlayNext(string uid) { if (!dialogObjs.ContainsKey(uid)) { DialogLocate.Log.LogError("播放下一步对话失败>>>>没有此对话", uid); return; } DialogObj dialog = dialogObjs[uid]; dialog.SetStep(dialog.CurrStep + 1); Play(uid); }
public void ClickDispose(string uid, int disposeId) { if (!dialogObjs.ContainsKey(uid)) { DialogLocate.Log.LogError("点击选项失败>>>>没有此对话", uid); return; } DialogObj dialog = dialogObjs[uid]; if (DialogLocate.Config.GetDialogStepModel(dialog.Model, dialog.CurrStep, out var model)) { if (DialogLocate.Config.GetDialogDisposeModel(model, disposeId, out var disposeModel)) { //返回判断 if (disposeModel.backToStep > 0) { if (DialogLocate.Config.GetDialogStepModel(dialog.Model, disposeModel.backToStep, out var nextStepModel)) { dialog.SetStep(disposeModel.backToStep); Play(uid); } else { DialogLocate.Log.LogError("点击选项失败>>>>返回步骤出错", uid, disposeModel.backToStep); return; } } else { Close(uid); } //执行函数 if (disposeModel.onChooseFuncs != null && disposeModel.onChooseFuncs.Count > 0) { for (int i = 0; i < disposeModel.onChooseFuncs.Count; i++) { disposeModel.onChooseFuncs[i].Execute(dialog, disposeId); } } //执行表现 DialogLocate.Display.OnClickDispose(dialog, disposeId); } else { DialogLocate.Log.LogError("点击选项失败>>>>没有此选项", uid, disposeId); } } else { DialogLocate.Log.LogError("点击选项失败>>>>没有此步骤", uid, dialog.CurrStep); } }