private void CheckVision() { if (playerCollider != null) { Vector3 playerPos = playerCollider.gameObject.transform.position; RaycastHit2D hit; if (FireRaycast(playerCollider.gameObject, numberOfRays, out hit)) { controller.shootOnce(); } } }
private void CheckVision() { if (playerCollider != null) { Vector3 playerPos = playerCollider.gameObject.transform.position; RaycastHit2D hit; if (FireRaycast(playerCollider.gameObject, numberOfRays, out hit)) { controller.shootOnce(); } } }