Exemplo n.º 1
0
        public ChatMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.Chat)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Scope    = (ChatScope)reader.GetByte();
            FromOrTo = reader.GetString();
            Message  = reader.GetString();
        }
Exemplo n.º 2
0
        public TokenMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.Token)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Token = reader.GetString();
        }
Exemplo n.º 3
0
        public InteractableStatusMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.InteractableStatus)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Id       = reader.GetString();
            IsActive = reader.GetBool();
        }
        public StartInteractMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.InteractableStart)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Id = reader.GetString();
            ClientTimeStamp = reader.GetLong();
            ServerTimeStamp = reader.GetLong();
        }
Exemplo n.º 5
0
        public PositionMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.Position)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Name             = reader.GetString();
            X                = reader.GetFloat();
            Y                = reader.GetFloat();
            Z                = reader.GetFloat();
            Rotation         = reader.GetFloat();
            Speed            = reader.GetFloat();
            CurrentAnimation = reader.GetInt();
        }