Ejemplo n.º 1
0
 void Awake()
 {
     if (Ref == null)
     {
         Ref = GetComponent <ManManager>();
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        //Button[] buttons = GetComponentsInChildren<Button>();
        //
        // for (int i = 0; i < ManManager.Ref.hireList.Count; ++i)
        // {
        //     if (i >= 4)
        //         break;
        //
        //     buttons[i].gameObject.SetActive(true);
        // }
        ManManager manRef = ManManager.Ref;

        if (manRef.hireList.Count >= 1)
        {
            b0.gameObject.SetActive(true);
            t0.text = manRef.hireList[0].ManFirstName + " " + manRef.hireList[0].ManLastName;
        }
        else
        {
            b0.gameObject.SetActive(false);
        }

        if (manRef.hireList.Count >= 2)
        {
            b1.gameObject.SetActive(true);
            t1.text = manRef.hireList[1].ManFirstName + " " + manRef.hireList[1].ManLastName;
        }
        else
        {
            b1.gameObject.SetActive(false);
        }

        if (manRef.hireList.Count >= 3)
        {
            b2.gameObject.SetActive(true);
            t2.text = manRef.hireList[2].ManFirstName + " " + manRef.hireList[2].ManLastName;
        }
        else
        {
            b2.gameObject.SetActive(false);
        }

        if (manRef.hireList.Count >= 4)
        {
            b3.gameObject.SetActive(true);
            t3.text = manRef.hireList[3].ManFirstName + " " + manRef.hireList[3].ManLastName;
        }
        else
        {
            b3.gameObject.SetActive(false);
        }

        //if(manRef.hireList.)
    }