void Start() { levelManager = FindObjectOfType <LevelManager>(); if (!levelManager) { throw new UnityException("Level manager could not be found"); } gameState = GameState.LOBBY; gameObject.AddComponent <MessageQueue>(); gameObject.AddComponent <ConnectionManager>(); NetworkRequestTable.init(); NetworkResponseTable.init(); cManager = gameObject.GetComponent <ConnectionManager>(); if (cManager) { cManager.setupSocket(); Debug.Log("Connecting to server..."); StartCoroutine(UpdateLoop(1f / Constants.updatesPerSecond)); } }
void Awake() { mainObject = GameObject.Find("MainObject"); NetworkRequestTable.init(); NetworkResponseTable.init(); }
void Awake() { DontDestroyOnLoad(gameObject); gameObject.AddComponent <MessageQueue>(); gameObject.AddComponent <ConnectionManager>(); NetworkRequestTable.init(); NetworkResponseTable.init(); }
void Awake() { DontDestroyOnLoad(gameObject); gameObject.AddComponent("MessageQueue"); gameObject.AddComponent("ConnectionManager"); NetworkRequestTable.init(); NetworkResponseTable.init(); SpeciesTable.initialize(); }
//ConnectionManager cManager = null; void Awake() { //cManager = new ConnectionManager(); gameObject.AddComponent <MessageQueue>(); gameObject.AddComponent <ConnectionManager>(); DontDestroyOnLoad(gameObject); NetworkRequestTable.init(); NetworkResponseTable.init(); SpeciesTable.initialize(); }
void Awake() { sceneController = FindObjectOfType <SceneController>(); if (!sceneController) { throw new UnityException("Scene Controller could not be found"); } gameState = GameState.LOGIN; gameObject.AddComponent <MessageQueue>(); gameObject.AddComponent <ConnectionManager>(); NetworkRequestTable.init(); NetworkResponseTable.init(); }
void Awake() { //DontDestroyOnLoad(gameObject); NetworkRequestTable.init(); NetworkResponseTable.init(); }