Exemplo n.º 1
0
        public override void Marshal(DataOutputStream dos)
        {
            base.Marshal(dos);
            if (dos != null)
            {
                try
                {
                    this._entityID.Marshal(dos);
                    dos.WriteByte((byte)this._padding1);
                    dos.WriteUnsignedByte((byte)this._variableParameters.Count);
                    this._entityLinearVelocity.Marshal(dos);
                    this._entityLocation.Marshal(dos);
                    this._entityOrientation.Marshal(dos);
                    dos.WriteUnsignedInt((uint)this._entityAppearance);

                    for (int idx = 0; idx < this._variableParameters.Count; idx++)
                    {
                        VariableParameter aVariableParameter = (VariableParameter)this._variableParameters[idx];
                        aVariableParameter.Marshal(dos);
                    }
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }
Exemplo n.º 2
0
        public override void Marshal(DataOutputStream dos)
        {
            base.Marshal(dos);
            if (dos != null)
            {
                try
                {
                    this._explodingEntityID.Marshal(dos);
                    this._eventID.Marshal(dos);
                    this._velocity.Marshal(dos);
                    this._locationInWorldCoordinates.Marshal(dos);
                    this._descriptor.Marshal(dos);
                    this._locationOfEntityCoordinates.Marshal(dos);
                    dos.WriteUnsignedByte((byte)this._detonationResult);
                    dos.WriteUnsignedByte((byte)this._variableParameters.Count);
                    dos.WriteUnsignedShort((ushort)this._pad);

                    for (int idx = 0; idx < this._variableParameters.Count; idx++)
                    {
                        VariableParameter aVariableParameter = (VariableParameter)this._variableParameters[idx];
                        aVariableParameter.Marshal(dos);
                    }
                }
                catch (Exception e)
                {
#if DEBUG
                    Trace.WriteLine(e);
                    Trace.Flush();
#endif
                    this.OnException(e);
                }
            }
        }