Beispiel #1
0
 private void Start()
 {
     if (Liderboard.GetLiderboard().Count > 0)
     {
         GetComponent <Text>().text = Liderboard.GetLiderboard()[0].ToString();
     }
 }
Beispiel #2
0
    private void Start()
    {
        List <int> vs = Liderboard.GetLiderboard();

        if (vs.Count > 0)
        {
            transform.GetChild(0).GetComponent <Text>().text = vs[0].ToString();
            for (int i = 1; i < vs.Count; i++)
            {
                Text text = Instantiate(transform.GetChild(0), transform).GetComponent <Text>();
                text.text = vs[i].ToString();
            }
        }
        else
        {
            Destroy(transform.GetChild(0).gameObject);
        }
        RectTransform rt = GetComponent <RectTransform>();

        rt.sizeDelta = new Vector2(rt.sizeDelta.x, 50 * vs.Count);
    }
Beispiel #3
0
 public void EndGamed()
 {
     Liderboard.SetLiderBoar(points);
     DeadPanel.SetActive(true);
 }