private void Start() { socket = GetComponent<NetSocket>(); viewManager = GetComponent<NetViewManager>(); zoneClient = GetComponent<NetZoneClient>(); ExampleItems.PopulateItemDatabase(); zoneClient.OnZoneSetupSuccess += ZoneSetupSuccessful; socket.Events.OnDisconnectedFromServer += DisconnectedFromServer; socket.StartSocket(); socket.RegisterRpcListener(this); }
private void Start() { socket = GetComponent<NetSocket>(); viewManager = GetComponent<NetViewManager>(); zoneClient = GetComponent<NetZoneClient>(); zoneClient.OnZoneSetupSuccess += ZoneSetupSuccessful; socket.Events.OnDisconnectedFromServer += DisconnectedFromServer; socket.Events.OnConnectedToServer += ConnectedToServer; socket.StartSocket(); socket.RegisterRpcListener(this); socket.Connect(ServerAddress); }