void Awake() { Main = this; this.connection_distribution = new ClientToInstancePackets.Distribution() { Default = OnReceive_Default, out_Error_c = OnReceive_Error_c, out_Verify_Result_c = OnReceive_Verify_Result_c, out_Map_Reset_c = OnReceive_Map_Reset_c, out_Map_TerrainBlock_c = OnReceive_Map_TerrainBlock_c, out_Player_SetControl_c = OnReceive_Player_SetControl_c, out_Character_Add_c = OnReceive_Character_Add_c, out_Character_Remove_c = OnReceive_Character_Remove_c, out_Character_Position_c = OnReceive_Character_Position_c, out_Character_Movement_c = OnReceive_Character_Movement_c, out_Character_UpdateStats_c = OnReceive_Character_UpdateStats_c }; this.Log.MessageLogged += Debug.Log; }
void Start() { //log.AnyLogged += Debug.Log; if (uiController == null) { Debug.LogError("GameController was not given a uiController."); } if (charListController == null) { Debug.LogError("GameController was not given a charListController."); } if (mapController == null) { Debug.LogError("GameController was not given a mapController."); } instConnection = InstanceServerConnection.Main; if (instConnection == null) { Debug.LogError("GameController could not find InstanceServerConnection."); } gameTime = new GameTime(); }