void Awake() { GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <PowerUpGameObjects> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); } GameObject tempflash = GameObject.FindGameObjectWithTag("FlashingTextBox"); if (ErrorWindow <PowerUpGameObjects> .CanBeAssigned(tempflash, this, "FlashingTextBox")) { flashText = tempflash.GetComponent <FlashingTextController> (); } GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector"); if (soundDirObj != null) { soundDirector = soundDirObj.GetComponent <SoundDirector> (); } else { Debug.Log("Cannot find the SoundDirector!"); } }
// Use this for initialization void Awake() { GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector"); if (soundDirObj != null) { soundDirector = soundDirObj.GetComponent <SoundDirector> (); } else { Debug.Log("Cannot find the SoundDirector!"); } GameObject directorObj = GameObject.FindGameObjectWithTag("Director"); if (directorObj != null) { director = directorObj.GetComponent <Director> (); } else { Debug.Log("Cannot find the SoundDirector!"); } pieces = new List <GameObject>(); foreach (Transform child in transform) { if (child.tag == "hiddenPuzzlePieces") { pieces.Add(child.gameObject); } } totalPiecesLeft = pieces.Count; if (pieces.Count == 1) { onlyOneChild = true; } GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <PuzzlePlatform> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); hintbox.AddObj(gameObject); } GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox"); if (ErrorWindow <PuzzlePlatform> .CanBeAssigned(tempFlash, this, "FlashingTextBox")) { flashText = tempFlash.GetComponent <FlashingTextController> (); flashText.AddObj(gameObject); } }
void Start() { GameObject temp = GameObject.FindGameObjectWithTag("Director"); if (ErrorWindow <ElevatorAreaTrigger> .CanBeAssigned(temp, this, "Director")) { director = temp.GetComponent <Director> (); } }
void Awake() { GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <killNilan> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); // hintbox.AddObj(gameObject); } }
void Awake() { GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox"); if (ErrorWindow <PuzzleInventory> .CanBeAssigned(tempFlash, this, "FlashingTextBox")) { flashText = tempFlash.GetComponent <FlashingTextController> (); flashText.AddObj(gameObject); } }
void Awake() { voidPosition = new Vector3(148f, -4.6f, 0); GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <DebugPlayer> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); } shrink = GameObject.FindGameObjectWithTag("Player").GetComponent <ShrinkPlayer> (); }
void Awake() { GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <MirrorScript> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); } GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox"); if (ErrorWindow <MirrorScript> .CanBeAssigned(tempFlash, this, "FlashingTextBox")) { flashText = tempFlash.GetComponent <FlashingTextController> (); } }
void Awake() { print("puzzle inventory awake"); GameObject temp = GameObject.FindGameObjectWithTag("HintBox"); if (ErrorWindow <PuzzlePieceActivator> .CanBeAssigned(temp, this, "HintBox")) { hintbox = temp.GetComponent <HintBoxController> (); } GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector"); if (soundDirObj != null) { soundDirector = soundDirObj.GetComponent <SoundDirector> (); } else { Debug.Log("Cannot find the SoundDirector!"); } }