void Start() { go_PC = GameObject.Find ("PC"); PCScript = GameObject.Find ("PC").GetComponent<TL_PCMove>(); NanobotScript = GameObject.Find ("PC").GetComponent<TL_NanobotParticles>(); //Finds the transform gameobject within the child go_SequencePad = transform.FindChild("Sequence_Pad").gameObject; //Sets the texture material with one of no colour go_SequencePad.GetComponent<Renderer>().material.SetTexture("_Illum", tx_NoColor); go_ColoredPad = transform.FindChild("Colored_Pad").gameObject; go_ColoredPad.GetComponent<Renderer>().material.SetTexture("_Illum", tx_NoColor); cam_Puzzle = GetComponentInChildren<Camera>(); //Obtains the Light component from the gameobject it finds go_GreenLight = GameObject.Find ("Green_Flash").GetComponent<Light>().gameObject; go_RedLight = GameObject.Find ("Red_Flash").GetComponent<Light>().gameObject; }
void Start() { NanobotScript = GameObject.Find ("PC").GetComponentInChildren<TL_NanobotParticles>(); }
void Start() { go_PC = GameObject.Find ("PC"); NanobotScript = go_PC.GetComponent<TL_NanobotParticles>(); }
void Start() { go_PC = GameObject.Find ("PC"); cam_PC = GameObject.Find ("PC").transform.FindChild("Camera").GetComponent<Camera>(); PCScript = GameObject.Find ("PC").GetComponent<TL_PCMove>(); NanobotScript = GameObject.Find ("PC").GetComponent<TL_NanobotParticles>(); cam_Maze = GameObject.Find ("Maze_Camera").GetComponent<Camera>(); //Finds the transform child go_Spring = transform.FindChild("Spring_Head").gameObject; SpringScript = transform.FindChild("Spring_Head").gameObject.GetComponent<TL_SpringScript>(); //Obtains the script component from the child transform go_CraneJoint01 = transform.FindChild("BoneArm/Bone001").gameObject; go_CraneJoint02 = transform.FindChild("BoneArm/Bone001/Bone002").gameObject; go_CraneJoint03 = transform.FindChild("BoneArm/Bone001/Bone002/Bone003").gameObject; go_CraneJoint04 = transform.FindChild("BoneArm/Bone001/Bone002/Bone003/Bone004").gameObject; //Obtains initial transform rotation values qt_StartingRotCraneJoint01 = go_CraneJoint01.transform.rotation; qt_StartingRotCraneJoint02 = go_CraneJoint02.transform.rotation; qt_StartingRotCraneJoint03 = go_CraneJoint03.transform.rotation; qt_StartingRotCraneJoint04 = go_CraneJoint04.transform.rotation; CraneScript = transform.FindChild("BoneArm").gameObject.GetComponent<DD_Arm_Control>(); go_Maze = transform.FindChild("Marble_Maze").gameObject; qt_StartingRotMaze = go_Maze.transform.rotation; MazeScript = transform.FindChild("Marble_Maze").gameObject.GetComponent<DD_Ball_Tilt>(); go_Seesaw = transform.FindChild("See-Saw").gameObject; qt_StartingRotSeeSaw = go_Seesaw.transform.rotation; SeesawScript = transform.FindChild("See-Saw").gameObject.GetComponent<DD_Ball_Tilt>(); go_Cannon = transform.FindChild("Cannon").gameObject; qt_StartingRotCannon = go_Cannon.transform.rotation; CannonScript = transform.FindChild("Cannon").gameObject.GetComponent<TL_CannonScript>(); go_Boulder = GameObject.Find ("Boulder"); v3_StartingPosBoulder = go_Boulder.transform.position; }