Exemplo n.º 1
0
    Transform GetTarget()
    {
        Transform target = enemies.ClosestEnemy(transform.position, range);

        // Look at "Start" when no target
        if (target == null)
        {
            target = GameObject.Find("Start").transform;
        }
        return(target);
    }