示例#1
0
        private void Awake()
        {
            connectionController = GetComponent <ConnectionController>();

            if (!shouldConnectLocally)
            {
                LoadDevAuthToken();
            }
        }
        private void CreateClientWorker()
        {
            if (currentClientWorker != null)
            {
                Destroy(currentClientWorker);
            }

            currentClientWorker  = Instantiate(clientWorkerPrefab);
            workerConnector      = currentClientWorker.GetComponent <ClientWorkerConnector>();
            connectionController = currentClientWorker.GetComponent <ConnectionController>();
            connectionController.InformOfUI(canvasCameraObj, screenUIController);
        }
        private void CreateClientWorker()
        {
            if (currentClientWorker != null)
            {
                Destroy(currentClientWorker);
            }

            currentClientWorker  = Instantiate(clientWorkerPrefab, transform.position, Quaternion.identity);
            workerConnector      = currentClientWorker.GetComponent <WorkerConnector>();
            tileProvider         = workerConnector as ITileProvider;
            connectionController = currentClientWorker.GetComponent <ConnectionController>();
            connectionController.InformOfUI(screenUIController);
        }
 private void Awake()
 {
     connectionController = GetComponent <ConnectionController>();
 }