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


C# IniFile.ReadFloat方法代码示例

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


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

示例1: LoadRules

		public override void LoadRules(IniFile.IniSection rules) {
			base.LoadRules(rules);

            WeaponType = rules.ReadEnum<WeaponType>("WeaponType", null);
			Action = rules.ReadEnum<Action>("Action", Action.MultiMissile);
			IsPowered = rules.ReadBool("IsPowered", true);
			DisableableFromShell = rules.ReadBool("DisableableFromShell");
			SidebarFlashTabFrames = rules.ReadInt("SidebarFlashTabFrames", -1);
			AIDefendAgainst = rules.ReadBool("AIDefendAgainst");
			PreClick = rules.ReadBool("PreClick");
			PostClick = rules.ReadBool("PostClick");
			ShowTimer = rules.ReadBool("ShowTimer");
			SpecialSound = Get<Sound>(rules.ReadString("SpecialSound"));
			StartSound = Get<Sound>(rules.ReadString("StartSound"));
			Range = rules.ReadFloat("Range", 0);
			LineMultiplier = rules.ReadInt("LineMultiplier", 0);
			Type = rules.ReadEnum<AbstractType>("Type", null);
			PreDependent = rules.ReadEnum<WeaponType>("PreDependent", null);
			AuxBuilding = Get<BuildingType>(rules.ReadString("AuxBuilding"));
			UseChargeDrain = rules.ReadBool("UseChargeDrain");
			ManualControl = rules.ReadBool("ManualControl");
			RechargeTime = rules.ReadFloat("RechargeTime", 5.0f);
			SidebarImage = rules.ReadString("SidebarImage", "");

		}
开发者ID:dkeetonx,项目名称:ccmaps-net,代码行数:25,代码来源:SuperWeaponType.cs

示例2: LoadRules

		public override void LoadRules(IniFile.IniSection rules) {
			base.LoadRules(rules);

			Normalized = rules.ReadBool("Normalized");
			Translucent = rules.ReadBool("Translucent");
			IsTiberium = rules.ReadBool("IsTiberium");
			IsMeteor = rules.ReadBool("IsMeteor");
			Elasticity = rules.ReadFloat("Elasticity", 0.8f);
			MinAngularVelocity = rules.ReadFloat("MinAngularVelocity");
			MaxAngularVelocity = rules.ReadFloat("MaxAngularVelocity", 0.174528f);
			Duration = rules.ReadInt("Duration", 30);
			MinZVel = rules.ReadFloat("MinZVel", 3.5f);
			MaxZVel = rules.ReadFloat("MaxZVel", 5f);
			MaxXYVel = rules.ReadFloat("MaxXYVel", 15f);
			Spawns = Get<VoxelAnimation>(rules.ReadString("Spawns"));
			SpawnCount = rules.ReadInt("SpawnCount");
			ShareBodyData = rules.ReadBool("ShareBodyData");
			ShareTurretData = rules.ReadBool("ShareTurretData");
			ShareBarrelData = rules.ReadBool("ShareBarrelData");
			VoxelIndex = rules.ReadInt("VoxelIndex");
			StartSound = Get<Sound>(rules.ReadString("StartSound"));
			StopSound = Get<Sound>(rules.ReadString("StopSound"));
			BounceAnim = Get<Animation>(rules.ReadString("BounceAnim"));
			ExpireAnim = Get<Animation>(rules.ReadString("ExpireAnim"));
			TrailerAnim = Get<Animation>(rules.ReadString("TrailerAnim"));
			Damage = rules.ReadInt("Damage");
			DamageRadius = rules.ReadInt("DamageRadius");
			Warhead = Get<WarheadType>(rules.ReadString("Warhead"));
			AttachedSystem = Get<ParticleSystem>(rules.ReadString("AttachedSystem"));
			ShareSource = Get<TechnoType>(rules.ReadString("ShareSource"));
		}
开发者ID:dkeetonx,项目名称:ccmaps-net,代码行数:31,代码来源:VoxelAnimation.cs


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