private void OnConnected(NetworkMessage netMsg) { Debug.LogWarning("Connected !"); if (reqMaster) { } else { QA.Invoke <int>("Connected", ClientCommand.identity.connectionId); client.Send(ImServices.MSG_COMMAND, ClientCommand.identity); } }
private void OnDisonnected(NetworkMessage netMsg) { Debug.LogWarning("Disconnected !"); if (reqMaster) { ImServices.players.Remove(netMsg.conn.connectionId); } else { if (client != null) { client = null; } QA.Invoke("Disconnected"); Invoke("Connect", 1f); } }
public void Connect() { if (reqMaster) { match.CreateMatch("default", (uint)playGameNum + 1, true, "", "", "", 0, reqDomain, OnMatchCreate); } else { if (client != null) { ClientCommand.identity.catId = GM.configs["貓咪"]; ClientCommand.identity.id = 0; QA.Invoke <int>("Connected", ClientCommand.identity.connectionId); client.Send(ImServices.MSG_COMMAND, ClientCommand.identity); } else { match.ListMatches(0, 10, "", false, 0, reqDomain, OnMatchList); } } }
private void OnGameEndFromServer(NetworkMessage netMsg) { QA.Invoke <int>("GameEnd", netMsg.ReadMessage <IntegerMessage>().value); }
private void OnGameFromServer(NetworkMessage netMsg) { GM.time = netMsg.ReadMessage <IntegerMessage>().value; QA.Invoke("Game"); }
private void OnCommandFromServer(NetworkMessage netMsg) { netMsg.ReadMessage <ClientSyncEvent>(ClientSyncEvent.identity); QA.Invoke <ClientSyncEvent>("Event", ClientSyncEvent.identity); }