void Start() { common = RPC.NetworkingCommon.Instance; networkingInfo = GameController.Instance.networkingInfo; if (networkingInfo.port == -1) { networkingInfo.port = RPC.NetworkingInfo.defaultPort; } if (networkingInfo.address == "") { networkingInfo.address = RPC.NetworkingInfo.defaultAddress; } playerLog = GetComponent <PlayerLog>(); common.RegisterOnConsole(playerLog.AddEvent); if (networkingInfo.isServer) { server = new RPC.Server(networkingInfo); server.RegisterOnClient(ClientAvailable); } client = new RPC.Client(networkingInfo); client.RegisterClientShutdown(ShutdownClient); }
void Start () { common = RPC.NetworkingCommon.Instance; networkingInfo = GameController.Instance.networkingInfo; if(networkingInfo.port == -1) networkingInfo.port = RPC.NetworkingInfo.defaultPort; if(networkingInfo.address == "") networkingInfo.address = RPC.NetworkingInfo.defaultAddress; playerLog = GetComponent<PlayerLog>(); common.RegisterOnConsole(playerLog.AddEvent); if(networkingInfo.isServer) { server = new RPC.Server(networkingInfo); server.RegisterOnClient(ClientAvailable); } client = new RPC.Client(networkingInfo); client.RegisterClientShutdown(ShutdownClient); }