public void Awake() { DialogBoxGO = GameObject.Find("Dialog Boxes"); GameObject tempGoObj; tempGoObj = CreateDialogGO("DB_SaveFile", "Save File"); dialogBoxSaveGame = tempGoObj.GetComponent <DialogBoxSaveGame>(); tempGoObj = CreateDialogGO("DB_LoadFile", "Load File"); dialogBoxLoadGame = tempGoObj.GetComponent <DialogBoxLoadGame>(); tempGoObj = CreateDialogGO("DB_Options", "Options"); dialogBoxOptions = tempGoObj.GetComponent <DialogBoxOptions>(); tempGoObj = CreateDialogGO("DB_Settings", "Settings"); dialogBoxSettings = tempGoObj.GetComponent <DialogBoxSettings>(); tempGoObj = CreateDialogGO("DB_Trade", "Trade"); dialogBoxTrade = tempGoObj.GetComponent <DialogBoxTrade>(); tempGoObj = CreateDialogGO("DB_PromptOrInfo", "Prompt or Info"); dialogBoxPromptOrInfo = tempGoObj.GetComponent <DialogBoxPromptOrInfo>(); tempGoObj = CreateDialogGO("DB_JobList", "Job List"); dialogBoxJobList = tempGoObj.GetComponent <DialogBoxJobList>(); tempGoObj = CreateDialogGO("DB_Quests", "Quests"); dialogBoxQuests = tempGoObj.GetComponent <DialogBoxQuests>(); AddQuestList(); AddMainMenuItems(); }
void Awake() { GameObject Controllers = GameObject.Find("Dialog Boxes"); GameObject tempGoObj; mc = GameObject.Find("Dialog Boxes").GetComponent <MenuController>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_SaveFile"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Save File"; dialogBoxSaveGame = tempGoObj.GetComponent <DialogBoxSaveGame>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_LoadFile"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Load File"; dialogBoxLoadGame = tempGoObj.GetComponent <DialogBoxLoadGame>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_Options"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Options"; dialogBoxOptions = tempGoObj.GetComponent <DialogBoxOptions>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_Settings"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Settings"; dialogBoxSettings = tempGoObj.GetComponent <DialogBoxSettings>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_Trade"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Trade"; dialogBoxTrade = tempGoObj.GetComponent <DialogBoxTrade>(); tempGoObj = (GameObject)Instantiate(Resources.Load("UI/DB_AreYouSure"), Controllers.transform.position, Controllers.transform.rotation, Controllers.transform); tempGoObj.name = "Are You Sure"; dialogBoxAreYouSure = tempGoObj.GetComponent <DialogBoxAreYouSure>(); }
public void Awake() { DialogBoxGO = GameObject.Find("Dialog Boxes"); GameObject tempGoObj; tempGoObj = CreateDialogGO("DB_SaveFile", "Save File"); dialogBoxSaveGame = tempGoObj.GetComponent <DialogBoxSaveGame>(); tempGoObj = CreateDialogGO("DB_LoadFile", "Load File"); dialogBoxLoadGame = tempGoObj.GetComponent <DialogBoxLoadGame>(); tempGoObj = CreateDialogGO("DB_Options", "Options"); dialogBoxOptions = tempGoObj.GetComponent <DialogBoxOptions>(); tempGoObj = CreateDialogGO("DB_Settings", "Settings"); dialogBoxSettings = tempGoObj.GetComponent <DialogBoxSettings>(); tempGoObj = CreateDialogGO("DB_Trade", "Trade"); dialogBoxTrade = tempGoObj.GetComponent <DialogBoxTrade>(); tempGoObj = CreateDialogGO("DB_AreYouSure", "Are You Sure"); dialogBoxAreYouSure = tempGoObj.GetComponent <DialogBoxAreYouSure>(); tempGoObj = CreateDialogGO("DB_JobList", "Job List"); dialogBoxJobList = tempGoObj.GetComponent <DialogBoxJobList>(); tempGoObj = CreateDialogGO("DB_Quests", "Quests"); dialogBoxQuests = tempGoObj.GetComponent <DialogBoxQuests>(); AddQuestList(); }
public void Awake() { DialogBoxes = new Dictionary <string, DialogBox>(); DialogBoxGO = GameObject.Find("Dialog Boxes"); GameObject tempGoObj; tempGoObj = CreateDialogGO("DB_LoadFile", "Load File"); dialogBoxLoadGame = tempGoObj.GetComponent <DialogBoxLoadGame>(); DialogBoxes["Load File"] = dialogBoxLoadGame; tempGoObj = CreateDialogGO("DB_Settings", "Settings"); dialogBoxSettings = tempGoObj.GetComponent <DialogBoxSettings>(); DialogBoxes["Settings"] = dialogBoxSettings; // Added for more dev options tempGoObj = CreateDialogGO("DB_Settings-Developer", "Developer Settings"); dialogBoxSettings.devOptions = tempGoObj.GetComponent <DialogBoxSettingsDeveloper>(); tempGoObj = CreateDialogGO("DB_PromptOrInfo", "Prompt or Info"); dialogBoxPromptOrInfo = tempGoObj.GetComponent <DialogBoxPromptOrInfo>(); DialogBoxes["Prompt or Info"] = dialogBoxPromptOrInfo; if (SceneController.Instance.IsAtMainScene()) { tempGoObj = CreateDialogGO("DB_SaveFile", "Save File"); dialogBoxSaveGame = tempGoObj.GetComponent <DialogBoxSaveGame>(); DialogBoxes["Save File"] = dialogBoxSaveGame; tempGoObj = CreateDialogGO("DB_Options", "Options"); dialogBoxOptions = tempGoObj.GetComponent <DialogBoxOptions>(); DialogBoxes["Options"] = dialogBoxOptions; tempGoObj = CreateDialogGO("DB_Trade", "Trade"); dialogBoxTrade = tempGoObj.GetComponent <DialogBoxTrade>(); DialogBoxes["Trade"] = dialogBoxTrade; tempGoObj = CreateDialogGO("DB_JobList", "Job List"); dialogBoxJobList = tempGoObj.GetComponent <DialogBoxJobList>(); DialogBoxes["Job List"] = dialogBoxJobList; tempGoObj = CreateDialogGO("DB_Quests", "Quests"); dialogBoxQuests = tempGoObj.GetComponent <DialogBoxQuests>(); DialogBoxes["Quests"] = dialogBoxQuests; AddQuestList(); LoadModdedDialogBoxes(); AddMainMenuItems(); } }