public void EnablePlayerSelect(Player[] players, OnPlayerSelect callback)
    {
        ActivePanel(playerSelectPanel.name);
        EnableClosability(false);

        // Delete previous gameObjects
        foreach (Transform child in playerSelectPanel.transform.GetChild(1).transform)
        {
            Destroy(child.gameObject);
        }

        foreach (Player p in players)
        {
            GameObject obj = GameObject.Instantiate(playerCardPrefab, Vector3.zero, Quaternion.identity);
            obj.GetComponentInChildren <Text>().text = p.name;
            obj.transform.SetParent(playerSelectPanel.transform.GetChild(1));
            EventTrigger.Entry entry = new EventTrigger.Entry();
            entry.eventID = EventTriggerType.PointerClick;
            entry.callback.AddListener((data) => {
                callback(p);
                Disable();
            });
            obj.GetComponent <EventTrigger>().triggers.Add(entry);
            obj.GetComponent <Image>().color = p.GetColor();
        }
    }
 private void PlayerSelected(object sender, TappedRoutedEventArgs e)
 {
     SelectedPlayer = sender as PlayerControl;
     if (OnPlayerSelect != null)
     {
         OnPlayerSelect.Invoke(sender);
     }
 }