Exemplo n.º 1
0
        protected override void ReadDelta(BinaryReader reader, NetVersion version)
        {
            sourceRect = new NetRectangle();
            if (sourceRect == null)
            {
                throw new Exception("WTF??? Why is netfield null");
            }
            if (reader == null)
            {
                throw new Exception("reader null");
            }
            if (value == null)
            {
                this.Set(new Animation());
            }
            sourceRect.Read(reader, version);
            Value.sourceRectangle = sourceRect.Value;

            frameDuration = new NetInt();
            frameDuration.Read(reader, version);
            Value.frameDuration = frameDuration.Value;

            frameDurationUntilNextAnimation = new NetInt();
            frameDurationUntilNextAnimation.Read(reader, version);
            Value.frameCountUntilNextAnimation = frameDurationUntilNextAnimation.Value;
        }
Exemplo n.º 2
0
        protected override void ReadDelta(BinaryReader reader, NetVersion version)
        {
            texture = new NetTexture2DExtended();
            texture.Read(reader, version);

            Value.setExtendedTexture(texture.Value);

            which = new NetInt();
            which.Read(reader, version);
            Value.ParentSheetIndex = which.Value;

            tilePos = new NetVector2();
            tilePos.Read(reader, version);
            Value.TileLocation = tilePos.Value;

            InventoryMaxSize = new NetInt();
            InventoryMaxSize.Read(reader, version);
            Value.inventoryMaxSize = InventoryMaxSize.Value;

            sourceRect = new NetRectangle();
            sourceRect.Read(reader, version);
            Value.sourceRect = sourceRect.Value;

            boundingBox = new NetRectangle();
            boundingBox.Read(reader, version);
            Value.boundingBox.Value = boundingBox.Value;

            drawPosition = new NetVector2();
            drawPosition.Read(reader, version);
            Value.drawPosition = drawPosition.Value;

            locationName = new NetString();
            locationName.Read(reader, version);
            Value.locationsName = locationName.Value;
            Value.thisLocation  = Game1.getLocationFromName(locationName.Value);

            /*
             * animationManager = new NetAnimationManager();
             * animationManager.Read(reader, version);
             * Value.animationManager = animationManager.Value;
             */
        }