// Update is called once per frame void Update() { Boss = FindObjectOfType <Enemy_NomalBoss>(); //Vector3 targetPos = tr_Player.position; //targetPos.z = transform.position.z; //transform.position = Vector3.SmoothDamp(transform.position, targetPos, ref velocity, smoothTime); //zm Debug.Log(targetPos); // 최소값엔 반너비 더하고 최대값엔 반너비 뺀다 // // CurrentCameraZone = CurrentCameraZone.cameraZone; CurrentCameraZoneIndex = CurrentCameraZone.CameraZoneIndex; if (player != null) { float x = Mathf.Clamp(player.transform.position.x, minBound.x + halfWidth, maxBound.x - halfWidth); float y = Mathf.Clamp(player.transform.position.y, minBound.y + halfHeight, maxBound.y - halfHeight); gameObject.transform.position = new Vector3(x, y, gameObject.transform.position.z); } //수직 }
// Use this for initialization void Start() { Boss = FindObjectOfType <Enemy_NomalBoss>(); StartCoroutine(ExplosionCoroutine()); }