Example #1
0
    private void CheckVision()
    {
        if (playerCollider != null)
        {
            Vector3 playerPos = playerCollider.gameObject.transform.position;

            RaycastHit2D hit;
            if (FireRaycast(playerCollider.gameObject, numberOfRays, out hit))
            {
                controller.shootOnce();
            }
        }
    }