static public void CreateViewControllerTest(string test) { Object prefab = ViewControllerManager.Instance.viewControllers[3]; GameObject go = Instantiate(prefab, ViewControllerManager.Instance.viewControllerCanvas.transform) as GameObject; DeveloperDialogViewController script = go.GetComponent <DeveloperDialogViewController>(); script.dialogText.text = test; }
// Start is called before the first frame update static public void CreateViewController(string identifier, List <NarrationInfo> narrationInfoList) { Object prefab = ViewControllerManager.Instance.viewControllers[3]; GameObject go = Instantiate(prefab, ViewControllerManager.Instance.viewControllerCanvas.transform) as GameObject; DeveloperDialogViewController script = go.GetComponent <DeveloperDialogViewController>(); script.Init(identifier, narrationInfoList); }
public void ShowNarrationWithIdentifier(NarrativeInfo narrativeInfo)//delegate, tag, give choice { string identifier = narrativeInfo.NarrationId; string narrativeIdentifier = narrativeInfo.identifier; Debug.Log("show narration " + identifier); if (!narrationDictionary.ContainsKey(identifier)) { Debug.LogError("identifier does not exist in narration dict " + identifier); } List <NarrationInfo> narrationInfos = narrationDictionary[identifier]; DeveloperDialogViewController.CreateViewController(narrativeIdentifier, narrationInfos); }
public void ShowNarrationWithIdentifier(string narrationIdentifier) { List <NarrationInfo> narrationInfos = narrationDictionary[narrationIdentifier]; DeveloperDialogViewController.CreateViewController(null, narrationInfos); }