Ejemplo n.º 1
0
    void Punch()
    {
        RaycastHit hit;

        if (Physics.Raycast(cam.transform.position, cam.transform.forward, out hit, mRange))
        {
            EnemyHealth target = hit.transform.GetComponent <EnemyHealth>();
            if (target != null)
            {
                target.EnemyStruck(pow);
            }
        }
    }