Beispiel #1
0
        public TokenMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.Token)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Token = reader.GetString();
        }
Beispiel #2
0
        public InteractableStatusMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.InteractableStatus)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Id       = reader.GetString();
            IsActive = reader.GetBool();
        }
Beispiel #3
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();
        }
        public StartInteractMessage(UdpDataReader reader)
        {
            if (reader.PeekByte() != (byte)MessageTypes.InteractableStart)
            {
                throw new NotSupportedException();
            }

            reader.GetByte();

            Id = reader.GetString();
            ClientTimeStamp = reader.GetLong();
            ServerTimeStamp = reader.GetLong();
        }
        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();
        }