/*float bobSpeed = 1.0f; * float stepCounter; * float bobAmountX = 0.1f; * float bobAmountY = 0.1f; * Vector3 lastPosition; * float heightRatio = 0.9f; * float aimingTrue = 1.0f; * float cameraDefault = 60.0f; * float targetCamera = 60.0f; * float cameraZoom = 1.0f; * float cameraZoomTo; * float cameraZoomSpeed = 0.1f;*/ void Awake() { player = GameObject.FindGameObjectWithTag("player"); CurrentYRotation = transform.parent.rotation.eulerAngles.y; yRotation = transform.parent.rotation.eulerAngles.y; Gun_X_Current = GunObj.transform.localPosition.x; Gun_Y_Current = GunObj.transform.localPosition.y; UiObj = GameObject.Find("/Canvas"); script_move = transform.parent.GetComponent <FirstPerson_move>(); script_grab = transform.parent.GetComponent <player_grab>(); script_RM = transform.parent.GetComponent <player_RMfunction>(); script_shot = transform.parent.GetComponent <player_shot>(); player_Cam = GetComponent <Camera>(); FOV_current = player_Cam.fieldOfView; }
void Awake() { //ray_Layermask = 1 << 2; ray_Layermask = 1 << 12; ray_Layermask = ~ray_Layermask; compo_Audio = GetComponent <AudioSource>(); pr = GetComponent <player_RMfunction>(); module_Obj_inGun = transform.GetChild(0).GetChild(0).GetChild(1).gameObject; Gun_Module_script = module_Obj_inGun.GetComponent <Module_in_Gun>(); script_Aim_ui = GetComponent <Aim_UI>(); Hologram_Marker[0] = GameObject.Find("Cam_Marker"); Hologram_Marker[1] = GameObject.Find("Pull_Machine_Marker"); StartCoroutine(Aim_investigate()); if (Hologram_Marker[0] == null || Hologram_Marker[1] == null) { Debug.Log("From Player_Shot 홀로그램 마커 설정 안되있음 2개 설정할것!!"); } //aim_Checker = Instantiate(aim_Mark_obj, Vector3.zero, Quaternion.identity); //총 조준점 확인용 }//변수 초기화