コード例 #1
0
        void OnPlayerDisconnect(int id, int reason)
        {
            ClientListSquirrel clientListSquirrel = this.g2OServerSquirrel.Clients as ClientListSquirrel;
            IClient            client             = this.g2OServerSquirrel.Clients[id];

            if (client != null)
            {
                clientListSquirrel?.OnClientDisconnect(new ClientDisconnectedEventArgs(client, (DisconnectReason)reason));
                ClientSquirrel realClientSquirrel = client as ClientSquirrel;
                realClientSquirrel?.OnDisconnect(new ClientDisconnectedEventArgs(client, (DisconnectReason)reason));
            }
        }
コード例 #2
0
        void OnPlayerJoin(int id)
        {
            ClientListSquirrel clientListSquirrel = this.g2OServerSquirrel.Clients as ClientListSquirrel;

            clientListSquirrel?.OnClientConnect(id);
        }