Exemplo n.º 1
0
        void OnMessageNetworkBehaviour(byte[] data, ulong steamID)
        {
            MessageNetworkBehaviour message = MessageNetworkBehaviour.FromBytes(data, 0);

            if (objectsFromServer.TryGetValue(message.networkID, out NetworkObject networkObject))
            {
                networkObject.HandleNetworkBehaviourMessage(message.index, message.data, steamID);
            }
            else
            {
                Debug.LogWarning(nameof(GameClient) + " does not have " + nameof(NetworkBehaviour) + " " + message.networkID + "[" + message.index + "] and therefore its message cannot be handled!");
            }
        }
Exemplo n.º 2
0
        void OnMessageNetworkBehaviour(byte[] data, ulong steamID)
        {
            MessageNetworkBehaviour message = MessageNetworkBehaviour.FromBytes(data, 0);

            networkObjects[message.networkID].HandleNetworkBehaviourMessage(message.index, message.data, steamID);
        }