当前位置: 首页>>代码示例>>C#>>正文


C# XmlReader.ReadAttrAsFloat方法代码示例

本文整理汇总了C#中System.Xml.XmlReader.ReadAttrAsFloat方法的典型用法代码示例。如果您正苦于以下问题:C# XmlReader.ReadAttrAsFloat方法的具体用法?C# XmlReader.ReadAttrAsFloat怎么用?C# XmlReader.ReadAttrAsFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlReader的用法示例。


在下文中一共展示了XmlReader.ReadAttrAsFloat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadXml

        public override void ReadXml(XmlReader reader)
        {
			this.Points = reader.ReadAttrAsFloat("Points", 0);
            this.DamageSpecified = reader.ReadAttrAsFloat("Damage", ref this.Damage);

            base.ReadXml(reader);
        }
开发者ID:valsavva,项目名称:dynacat,代码行数:7,代码来源:XEnemy.cs

示例2: ReadXml

        public override void ReadXml(XmlReader reader)
        {
            reader.ReadAttrAsString("Name", ref this.Name);
            reader.ReadAttrAsString("File", ref this.File);
            reader.ReadAttrAsInt("BombCount", ref this.BombCount);
            reader.ReadAttrAsFloat("HeroHealth", ref this.HeroHealth);
            reader.ReadAttrAsString("ExplosionClass", ref this.ExplosionClass);
            
			reader.ReadAttrAsFloat("StarScoreRatio1", ref this.StarScoreRatio1);
			reader.ReadAttrAsFloat("StarScoreRatio2", ref this.StarScoreRatio2);
			reader.ReadAttrAsFloat("StarScoreRatio3", ref this.StarScoreRatio3);
			reader.ReadAttrAsFloat("TimeBonusThreshold", ref this.TimeBonusThreshold);
			reader.ReadAttrAsFloat("HealthBonusThreshold", ref this.HealthBonusThreshold);
			reader.ReadAttrAsFloat("TimeBonusRatio", ref this.TimeBonusRatio);
			reader.ReadAttrAsFloat("TimeExtraBonusRatio", ref this.TimeExtraBonusRatio);
			reader.ReadAttrAsFloat("HealthBonusRatio", ref this.HealthBonusRatio);
			
            base.ReadXml(reader);
			
			if (string.IsNullOrEmpty(this.Name))
				this.Name = this.Id;
        }
开发者ID:valsavva,项目名称:dynacat,代码行数:22,代码来源:XLevelInfo.cs

示例3: ReadXml

		public override void ReadXml(XmlReader reader)
		{
			this.Id = reader["Id"];
			reader.ReadAttrAsFloat("AvailablePoints", ref availablePoints);
			reader.ReadAttrAsFloat("Score", ref score);
			reader.ReadAttrAsFloat("Time", ref time);
			reader.ReadAttrAsFloat("Health", ref health);
		}
开发者ID:valsavva,项目名称:dynacat,代码行数:8,代码来源:XLevelScore.cs


注:本文中的System.Xml.XmlReader.ReadAttrAsFloat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。