Exemple #1
0
    void Fire()
    {
        RaycastHit hit;

        if (Physics.Raycast(camera.transform.position, camera.transform.forward, out hit))
        {
            Orc orc = hit.transform.GetComponent <Orc>();

            if (orc != null)
            {
                orc.Kill();
            }
        }
    }