// Use this for initialization protected virtual void Start () { controller = new CamoSniperController (this); bill = GameObject.FindGameObjectWithTag ("BillRizer"); // set xRange so that CamoSniper only shoots once Bill can see it var mainCamera = GameObject.FindGameObjectWithTag ("MainCamera"); xRange = (mainCamera.camera.orthographicSize * 2f * mainCamera.camera.aspect)/2; screenWidth = (mainCamera.camera.orthographicSize * 2f * mainCamera.camera.aspect); InvokeRepeating ("updateCrouchState", 1, 3); }
// Use this for initialization protected virtual void Start() { controller = new CamoSniperController(this); bill = GameObject.FindGameObjectWithTag("BillRizer"); // set xRange so that CamoSniper only shoots once Bill can see it var mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); xRange = (mainCamera.camera.orthographicSize * 2f * mainCamera.camera.aspect) / 2; screenWidth = (mainCamera.camera.orthographicSize * 2f * mainCamera.camera.aspect); InvokeRepeating("updateCrouchState", 1, 3); }