//============================================================================================================================================================================ void Awake() { Vector2 Size_Delta = transform.GetComponent <RectTransform>().sizeDelta; transform.SetParent(GameObject.Find("Canvas").transform); transform.localPosition = new Vector3(0, 0, 0); transform.localScale = new Vector3(1, 1, 1); transform.GetComponent <RectTransform>().sizeDelta = Size_Delta; Play_Script = GameObject.Find("Script_Object").GetComponent <GamePlay_Script>(); CameraControlScript = GameObject.Find("Camera_Set_Object").GetComponent <CameraControl_Script>(); Net_Script = GameObject.Find("Network_Script").GetComponent <Network_Battle_Script>(); }
void Awake() { Transform[] GetTransforms = transform.GetComponentsInChildren <Transform>(); foreach (Transform child in GetTransforms) { for (int i = 0; i < Destroy_OJ.Length; i++) { if (child.name.Equals("Destroy_OJ_Pos (" + i + ")")) { Destroy_OJ[i] = child.gameObject.GetComponent <Transform>(); } } } CameraControlScript = GameObject.Find("Camera_Set_Object").GetComponent <CameraControl_Script>(); }
void Awake() { Game_Script = GameObject.Find("Script_Object").GetComponent <GamePlay_Script>(); CameraControlScript = GameObject.Find("Camera_Set_Object").GetComponent <CameraControl_Script>(); Net_Script = GameObject.Find("Network_Script").GetComponent <Network_Battle_Script>(); Char_Controller = GetComponent <CharacterController>(); Char_Animator = transform.GetComponent <Animator>(); Audio_Source = transform.GetComponent <AudioSource>(); //---------------------------------------------------------------------------------------------------------------------------------- Transform[] GetTransforms = transform.GetComponentsInChildren <Transform>(); //랙돌 셋팅 Ragdoll_Layer = LayerMask.NameToLayer("Ragdoll"); Ragdoll_Die_Layer = LayerMask.NameToLayer("Ragdoll_Die"); Bot_Ragdoll_Rigidbody.Clear(); foreach (Transform child in GetTransforms) { for (int i = 0; i < Ragdoll_Collider_Name.Length; i++) { if (child.name.Equals(Ragdoll_Collider_Name[i])) { if (Bot_Ragdoll_Rigidbody.ContainsKey(Ragdoll_Collider_Name[i]) == false) { Bot_Ragdoll_Rigidbody.Add(Ragdoll_Collider_Name[i], new Bot_Ragdoll_Rigidbody_class()); Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].GameObject_OJ = child.gameObject; Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].Transform_OJ = child; Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].Rigid_Body = child.GetComponent <Rigidbody>(); //Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].Rigid_Body.collisionDetectionMode = CollisionDetectionMode.Continuous; Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].Rigid_Body.isKinematic = true; Bot_Ragdoll_Rigidbody[Ragdoll_Collider_Name[i]].GameObject_OJ.layer = Ragdoll_Layer; } break; } } } //---------------------------------------------------------------------------------------------------------------------------------- //아웃라인 효과 오브젝트 가져오기 foreach (Transform child in GetTransforms) { if (child.GetComponent <Outline>() != null) { if (Bot_Out_Line_OJ.ContainsKey(child.name) == false) { Bot_Out_Line_OJ.Add(child.name, new Bot_Out_Line_class()); Bot_Out_Line_OJ[child.name].OJ = child.GetComponent <Outline>(); Bot_Out_Line_OJ[child.name].OJ.enabled = false; } } } //---------------------------------------------------------------------------------------------------------------------------------- Char_Controller_Layer = LayerMask.NameToLayer("Char_Controller"); }
void Awake() { Game_Script = GameObject.Find("Script_Object").GetComponent <GamePlay_Script>(); CameraControlScript = GameObject.Find("Camera_Set_Object").GetComponent <CameraControl_Script>(); }