// Use this for initialization void Start() { // grab references screenFader = GameObject.FindWithTag("ScreenFader").GetComponent <ScreenFader>(); narrativeDialogue = GetComponent <NarrativeDialogue>(); fpsController = GameObject.FindWithTag("Player").GetComponent <FirstPersonController>(); objectiveDialogue = GameObject.FindWithTag("ObjectiveDialogue"); // set objective dialogue to false objectiveDialogue.SetActive(false); handlerUI = GetComponent <UIHandler>(); // initialise objectives string array objectives = new string[3]; // set the three objectives objectives[0] = "Find The Manager's Office!"; objectives[1] = "Find The Keycode for the storeroom!"; objectives[2] = "Complain to the Manager!"; // initialise keycode digits array digits = new int[4]; // cycle through each and make sure they equal -1 for (int i = 0; i < digits.Length; i++) { digits[i] = -1; } // grab the dialogue controller dialogueController = GetComponent <DialogueController>(); }
// Use this for initialization void Awake() { mainCam = Camera.main; itemInfoUI = GameObject.FindWithTag("ItemInfoUI"); inventory = GameObject.FindWithTag("GameController").GetComponent <InventoryController>(); gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); narrativeDialogue = GameObject.FindWithTag("GameController").GetComponent <NarrativeDialogue>(); dialogueController = GameObject.FindWithTag("GameController").GetComponent <DialogueController>(); dialogueUI = GameObject.FindWithTag("DialogueUI").gameObject; }
/// public NarrativeCharacter(string n, bool enableOnStart = true) { NarrativeCharacterManager ncm = NarrativeCharacterManager.instance; GameObject ncprefab = Resources.Load("NarrativeDummyCharacters/Char[" + n + "]") as GameObject; GameObject gob = GameObject.Instantiate(ncprefab, ncm.charPanel); root = gob.GetComponent <RectTransform>(); charname = n; renderers.singlayer = gob.GetComponentInChildren <RawImage>(); if (isMultiLayerCharacter) { renderers.body = gob.transform.Find("BodyLayer").GetComponentInChildren <Image>(); renderers.expression = gob.transform.Find("ExpressionLayer").GetComponentInChildren <Image>(); renderers.allBodies.Add(renderers.body); renderers.allExpressions.Add(renderers.expression); } nd = NarrativeDialogue.instance; enabled = enableOnStart; }
void Awake() { instance = this; }
// Start is called before the first frame update void Start() { nd = NarrativeDialogue.instance; }