Ejemplo n.º 1
0
    void FindTarget()
    {
        for (int i = 0; i < 4; i++)
        {
            if (GameManager.Instance.GetPlayer(i) == null)
            {
                continue;
            }

            Player_Health playerHealth = GameManager.Instance.GetPlayer(i).GetComponent <Player_Health> ();
            if (playerHealth.GetPlayerTag().Id != playerTag.Id)
            {
                targetObject = GameManager.Instance.GetPlayer(i);
                break;
            }
        }
    }