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; }
void Start() { go_CraneArm = GameObject.Find ("Marble_Run_Puzzle/BoneArm/Bone001/Bone002/Bone003/Bone004/Bone005"); ArmControlScript = GameObject.Find ("Marble_Run_Puzzle/BoneArm").GetComponent<DD_Arm_Control>(); }