protected override void ReadDelta(BinaryReader reader, NetVersion version) { //Checks to see if the current animation is nothing, aka null. NetBool isNull = new NetBool(); isNull.Read(reader, version); bool valueIsNull = isNull.Value; if (isNull) { NetTexture2DExtended nullTexture = new NetTexture2DExtended(); nullTexture.Read(reader, version); NetAnimation nullAnimation = new NetAnimation(); nullAnimation.Read(reader, version); Value.setExtendedTexture(nullTexture.Value); Value.defaultDrawFrame = nullAnimation.Value; return; } NetString currentAnimationName = new NetString(); currentAnimationName.Read(reader, version); NetInt currentIndex = new NetInt(); currentIndex.Read(reader, version); NetTexture2DExtended text = new NetTexture2DExtended(); text.Read(reader, version); NetAnimation defaultAnimation = new NetAnimation(); defaultAnimation.Read(reader, version); NetBool enabled = new NetBool(); enabled.Read(reader, version); NetString data = new NetString(); data.Read(reader, version); Value.setExtendedTexture(text.Value); Value.defaultDrawFrame = defaultAnimation.Value; Value.enabled = enabled.Value; //Try and prevent unnecessary parsing. if (Value.animations == null && !String.IsNullOrEmpty(Value.animationDataString)) { Value.animations = Animations.AnimationManager.parseAnimationsFromXNB(data.Value); } if (!String.IsNullOrEmpty(data.Value)) { Value.setAnimation(currentAnimationName.Value, currentIndex.Value); } else { Value.currentAnimation = defaultDrawFrame.Value; } }