Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
    void Start()
    {
        socket      = GetComponent <NetSocket>();
        viewManager = GetComponent <NetViewManager>();
        zoneClient  = GetComponent <NetZoneClient>();

        zoneClient.OnZoneSetupSuccess          += ZoneSetupSuccessful;
        socket.Events.OnConnectedToServer      += ConnectedToServer;
        socket.Events.OnDisconnectedFromServer += DisconnectedFromServer;
        viewManager.OnNetViewCreated           += OnNetViewCreated;

        socket.StartSocket();
        socket.RegisterRpcListener(this);

        NetSerializer.Add <Item>(Item.Serialize, Item.Deserialize);
        NetSerializer.Add <Equip>(Item.Serialize, Item.Deserialize);

        socket.Connect(serverIps[serverIpIndex] + ":" + serverPort);
    }