//public // Use this for initialization void Start() { uiEngine = GameObject.Find("UIMaster").GetComponent <UIEngine> (); narrativeEngine = GameObject.Find("NarrativeMaster").GetComponent <NarrativeEngine> (); objectiveTimer = new BasicTimer(0); transitionTimer = new BasicTimer(0); }
// game objects to keep track of void Awake() { if (instance == null) { instance = this; } // check for if there is a multiple or pre-existing player object in a scene, // and destroys it, so that only the very first instantiation exists else if (instance != this) { Destroy(gameObject); } // tells Unity not to destroy this object DontDestroyOnLoad(gameObject); }
public void DoNarrative() { Debug.Log("Running do Narrative, true = layer, false = key " + t4Layerf4Key); if (t4Layerf4Key == true) { GameObject nm = GameObject.Find("NarrativeMaster"); NarrativeEngine ne = nm.GetComponent <NarrativeEngine> (); BasicNarrativeEngine bse = ne.narrativeManager; NarrativeObject bst = bse.GetHeaviestNarrativeKey(narrativeLayer); Debug.Log(bst); string tts = bst.narrativeObject.keyValue; //string textToShow= GameObject.Find("NarrativeMaster").GetComponent<NarrativeEngine> ().narrativeManager.GetHeaviestNarrativeKey (narrativeLayer).narrativeObject.keyValue; uiMaster.GetComponent <UIEngine> ().DisplayNarrativeText(tts); } else { } }
public void Start() { portrait = GetComponent <Image> (); narrativeEngine = FindObjectOfType <NarrativeEngine>(); player = FindObjectOfType <PlayerController> ().GetComponent <PlayerController> (); }
void Start() { portrait = GetComponent <SpriteRenderer> ().sprite; narrativeEngine = FindObjectOfType <NarrativeEngine>(); }
// Use this for initialization void Start() { narrativeEngine = FindObjectOfType <NarrativeEngine>(); }