Example #1
0
        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);
        }
Example #2
0
        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);
        }