示例#1
0
    private void OnReceivedMessage(byte[] data, ClientDataContainer clientData)
    {
        Debug.Log("new");
        GameObject         obj          = Instantiate(ClientUIPrefab, ContentPanel.transform);
        ClientUIController uIController = obj.GetComponent <ClientUIController>();

        uIController.Initialize(server, clientData);
        clientUIs.Add(uIController);
    }
示例#2
0
 public void UpdateUI()
 {
     clientUIs.ForEach((ui) => Destroy(ui.gameObject));
     clientUIs.Clear();
     server.ClientDataList.ForEach((client) =>
     {
         Debug.Log("new");
         GameObject obj = Instantiate(ClientUIPrefab, ContentPanel.transform);
         ClientUIController uIController = obj.GetComponent <ClientUIController>();
         uIController.Initialize(server, client);
         clientUIs.Add(uIController);
     });
 }