Esempio n. 1
0
        /// <summary>
        /// Deserialize the state of this sprite.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public void DeserializeState(System.IO.BinaryReader reader)
        {
            Color  = reader.ReadColor();
            Effect = (SpriteEffects)reader.ReadByte();
            Scale  = reader.ReadVector2();
            Anchor = reader.ReadVector2();
            var anim = new Animation();

            anim.Deserialize(reader);
            _anim        = anim;
            CurrentFrame = reader.ReadInt32();
            _negDir      = reader.ReadBoolean();
            _timer       = reader.ReadSingle();
        }