Пример #1
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            this.Target   = reader["Target"];
            this.From     = reader["From"];
            this.To       = reader["To"];
            this.Duration = reader["Duration"];
            this.IsDelta  = reader.ReadAttrAsBoolean("IsDelta");
            reader.ReadAttrAsEnum <CurveTangent>("Smoothing", ref this.Smoothing);
            this.Autoreverse = reader.ReadAttrAsBoolean("Autoreverse");
            reader.ReadAttrAsEnum <XAnimationFillBehavior>("Fill", ref this.Fill);
            reader.ReadAttrAsBoolean("EnableTrace", ref this.EnableTrace);

            base.ReadXml(reader);
        }
Пример #2
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            this.FileId   = reader["FileId"];
            this.Volume   = reader.ReadAttrAsFloat("Volume");
            this.IsLooped = reader.ReadAttrAsBoolean("IsLooped");

            base.ReadXml(reader);
        }
Пример #3
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            this.InProgress = reader.ReadAttrAsBoolean("InProgress");
            reader.ReadAttrAsFloat("RepeatTime", ref this.RepeatTime);
            reader.ReadAttrAsFloat("RepeatCount", ref this.RepeatCount);

            base.ReadXml(reader);
        }
Пример #4
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            this.EnterAction   = reader["EnterAction"];
            this.ExitAction    = reader["ExitAction"];
            this.Action        = reader["Action"];
            this.Group         = reader["Group"];
            this.StayTriggered = reader.ReadAttrAsBoolean("StayTriggered");

            base.ReadXml(reader);
        }
Пример #5
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            Color  color = Color.White;
            double f     = 0;

            reader.ReadAttrAsBoolean("IsRoot", ref this.IsRoot);
            reader.ReadAttrAsFloat("Opacity", ref this.Opacity);
            reader.ReadAttrAsFloat("Rotation", ref this.Rotation);
            reader.ReadAttrAsVector2("ScaleVector", ref this.ScaleVector);

            reader.ReadAttrAsRectF("Bounds", ref this.Bounds);
            if (reader.ReadAttrAsColor("BackColor", ref color))
            {
                this.BackColor = color;
            }
            if (reader.ReadAttrAsVector2("Origin", ref tmpVector1))
            {
                this.Origin = tmpVector1;
            }
            if (reader.ReadAttrAsVector2("RotationCenter", ref tmpVector1))
            {
                this.RotationCenter = tmpVector1;
            }
            if (reader.ReadAttrAsFloat("Scale", ref f))
            {
                this.Scale = f;
            }
            if (reader.ReadAttrAsFloat("Depth", ref f))
            {
                this.Depth = (float)f;
            }
            if (reader.ReadAttrAsVector2("Location", ref tmpVector1))
            {
                this.Location = tmpVector1;
            }
            if (reader.ReadAttrAsVector2("Center", ref tmpVector1))
            {
                this.Center = tmpVector1;
            }

            base.ReadXml(reader);
        }
Пример #6
0
//		public override void Draw(DrawParameters p)
//		{
//			if (this.CacheContent && updated)
//			{
//				if (cachedContent == null)
//				{
//					cachedContent = new RenderTarget2D(
//						p.Game.GraphicsDevice,
//						p.Game.GraphicsDevice.PresentationParameters.BackBufferWidth,
//						p.Game.GraphicsDevice.PresentationParameters.BackBufferHeight,
//			            false, SurfaceFormat.Color, DepthFormat.None
//			        );
//
//					p.SpriteBatch.End();
//					//var oldSpriteBatch = p.SpriteBatch;
//					//p.SpriteBatch = new SpriteBatchWithFloats(p.Game.GraphicsDevice);
//
//					p.Game.GraphicsDevice.SetRenderTarget(cachedContent);
//					p.Game.GraphicsDevice.Clear(Color.Transparent);
//
//					p.SpriteBatch.Begin();
//
//					base.Draw(p);
//
//					p.SpriteBatch.End();
//
//					p.Game.GraphicsDevice.SetRenderTarget(null);
//
//					p.SpriteBatch.Begin();
//					//p.SpriteBatch = oldSpriteBatch;
//				}
//
//				p.SpriteBatch.Draw(cachedContent, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, p.NextSystemImageDepth());
//			}
//			else
//			{
//				if (cachedContent != null)
//				{
//					cachedContent.Dispose();
//					cachedContent = null;
//				}
//
//				base.Draw(p);
//			}
//
//		}

        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadAttrAsBoolean("CacheContent", ref this.CacheContent);

            base.ReadXml(reader);
        }