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


C# IO.GetSection方法代码示例

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


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

示例1: RoundInformation

		public RoundInformation(FightEngine engine, IO.TextFile file)
			: base(engine)
		{
			if (file == null) throw new ArgumentNullException("file");

			IO.TextSection roundsection = file.GetSection("Round");
			IO.TextSection powerbarsection = file.GetSection("Powerbar");

            var elements = Engine.Elements;

            elements.Build(roundsection, "round.default");
            elements.Build(roundsection, "round");
            elements.Build(roundsection, "round1");
            elements.Build(roundsection, "round2");
            elements.Build(roundsection, "round3");
            elements.Build(roundsection, "round4");
            elements.Build(roundsection, "round5");
            elements.Build(roundsection, "round6");
            elements.Build(roundsection, "round7");
            elements.Build(roundsection, "round8");
            elements.Build(roundsection, "round9");
            elements.Build(roundsection, "fight");
            elements.Build(roundsection, "KO");
            elements.Build(roundsection, "DKO");
            elements.Build(roundsection, "TO");
            elements.Build(roundsection, "win");
            elements.Build(roundsection, "win2");
            elements.Build(roundsection, "draw");

            elements.Build(powerbarsection, "level1");
            elements.Build(powerbarsection, "level2");
            elements.Build(powerbarsection, "level3");
            elements.Build(powerbarsection, "level4");
            elements.Build(powerbarsection, "level5");
            elements.Build(powerbarsection, "level6");
            elements.Build(powerbarsection, "level7");
            elements.Build(powerbarsection, "level8");
            elements.Build(powerbarsection, "level9");

			m_roundsforwin = roundsection.GetAttribute<Int32>("match.wins");
			m_maxdrawgames = roundsection.GetAttribute<Int32>("match.maxdrawgames");
			m_introdelay = roundsection.GetAttribute<Int32>("start.waittime");
			m_defaultlocation = (Vector2)roundsection.GetAttribute<Point>("pos");
			m_rounddisplaytime = roundsection.GetAttribute<Int32>("round.time");
			m_controltime = roundsection.GetAttribute<Int32>("ctrl.time");
			m_koslowtime = roundsection.GetAttribute<Int32>("slow.time");
			m_overwaittime = roundsection.GetAttribute<Int32>("over.waittime");
			m_overhittime = roundsection.GetAttribute<Int32>("over.hittime");
			m_overwintime = roundsection.GetAttribute<Int32>("over.wintime");
			m_overtime = roundsection.GetAttribute<Int32>("over.time");
			m_wintime = roundsection.GetAttribute<Int32>("win.time");

			m_roundnumbers = BuildRoundNumbersSoundMap();
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:54,代码来源:RoundInformation.cs


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