Пример #1
0
        public virtual void Deserialize(byte[] data, Pointer p)
        {
            int numScripts = BitPacker.GetInt(data, p);

            for (int i = 0; i < numScripts; i++)
            {
                uint scriptId = BitPacker.GetUInt(data, p);
                Scripts.AttachScript(scriptId);
            }

            int numEffects = BitPacker.GetInt(data, p);

            for (int i = 0; i < numEffects; i++)
            {
                uint   effectId = BitPacker.GetUInt(data, p);
                Effect e        = Effect.GetEffect(effectId);

                if (e != null)
                {
                    e.Deserialize(data, p);
                }

                Effects.AttachEffect(this, null, effectId);
            }

            PhysicalState.Position.X = BitPacker.GetDouble(data, p);
            PhysicalState.Position.Y = BitPacker.GetDouble(data, p);
            PhysicalState.Position.Z = BitPacker.GetDouble(data, p);

            PhysicalState.Rotation.X = BitPacker.GetDouble(data, p);
            PhysicalState.Rotation.Y = BitPacker.GetDouble(data, p);
            PhysicalState.Rotation.Z = BitPacker.GetDouble(data, p);
        }
Пример #2
0
        public override void Deserialize(byte[] data, Pointer p)
        {
            GamesPlayed             = BitPacker.GetInt(data, p);
            RatingMean              = BitPacker.GetDouble(data, p);
            RatingStandardDeviation = BitPacker.GetDouble(data, p);

            base.Deserialize(data, p);
        }
Пример #3
0
        public override void DeserializeValue(byte[] dat, Pointer p)
        {
            int num = BitPacker.GetInt(dat, p);

            m_Value = new double[num];
            for (int i = 0; i < num; i++)
            {
                Name       = BitPacker.GetString(dat, p);
                m_Value[i] = BitPacker.GetDouble(dat, p);
            }
        }
Пример #4
0
 public override void DeserializeValue(byte[] dat, Pointer p)
 {
     Name    = BitPacker.GetString(dat, p);
     m_Value = BitPacker.GetDouble(dat, p);
 }