public void LoadStoryNextInit(string name, DialogView.ProcessAnswerFunction pa = null) { LoadStory(name, nextInit, pa); }
//------------------------------------------------------------------------------ public void LoadStory(string name, string dialogId, DialogView.ProcessAnswerFunction pa = null) { // Log.GameTimes ("InitDialog Name : "+ name); if(name!=null) dialogView.StoryId = name; dialogView.Load(configResourcePath+"dialogs_"+name); if(pa != null) dialogView.ProcessAnswer = pa; nextInit=dialogId; // Log.GameTimes("NextDialog : "+nextInit+ " "+ name); dialogView.ActivateDialog(dialogId); }
public void LoadStory(string name, DialogView.ProcessAnswerFunction pa = null) { LoadStory(name, "D001", pa); }
/// <summary> /// ctor /// </summary> private DialogManager() { Log.Debug("DialogManager initialized."); GameObject dia = UIManager.Instance.GetHud("Dialogs"); if(dia == null) { Log.Error("Dialog obj missing: Dialogs"); return; } dialogView = dia.GetComponent<DialogView>(); nextInit = "D001"; //register event handler GameManager.Instance.RegisterEventHandler("DIALOG", EventHandler); //TODO Where to remove this EventHandler // with GameManager.Remove(EventHandler); // Destructor is not possible }//GameManager()