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


C# LoadMode.Equals方法代码示例

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


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

示例1: OnLevelLoaded

 public override void OnLevelLoaded(LoadMode mode)
 {
     toggleOn = false;
     loadMode = mode;
     PersistentResourceView.currentInfomode = InfoManager.InfoMode.None;
     if (mode.Equals(LoadMode.NewGame) || mode.Equals(LoadMode.LoadGame)){
         ColossalFramework.UI.UIButton resourceButton = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").FindChild("Resources").gameObject.GetComponent<ColossalFramework.UI.UIButton>();
         resourceButton.eventClick += ButtonClick;
     }
     else if (mode.Equals(LoadMode.NewMap) || mode.Equals(LoadMode.LoadMap)){
         DebugOutputPanel.AddMessage(ColossalFramework.Plugins.PluginManager.MessageType.Message, "mapstuff loaded");
         ColossalFramework.UI.UIButton[] infoviewButtons = GameObject.Find("InfoViewsPanel").transform.FindChild("Container").gameObject.GetComponentsInChildren<ColossalFramework.UI.UIButton>();
         foreach (ColossalFramework.UI.UIButton button in infoviewButtons){
             button.eventClick +=ButtonClick;
         }
     }
 }
开发者ID:asceth,项目名称:PersistentResourceView,代码行数:17,代码来源:PersistentResourceView.cs

示例2: OnLevelLoaded

        // Thread: Simulation
		public override void OnLevelLoaded(LoadMode mode) {

            // check it is new game
			if ( mode.Equals( ICities.LoadMode.NewGame ) ) {
				// update terrain data so that the game knows to print detailed versions of each tile instead of the basic "locked" versions
				// when unlocking tiles before the game is loaded, it skips this step since the game hasn't rendered yet

				// refresh all tiles, even those which weren't unlocked
				int rows = 5;

				for (int x = 0; x < rows; x++) {

					for (int z = 0; z < rows; z++) {
						int column = x;
						int row = z;

						if (rows.Equals (3)) {
							column = x + 1;
							row = z + 1;
						}
							
						int skip = 2;
						int num = 120;
						TerrainModify.UpdateArea( ( x + skip ) * num - 4, ( z + skip ) * num - 4, ( ( x + skip ) + 1) * num + 4, ( ( z + skip ) + 1) * num + 4, true, true, true);
					}         
				}
            }
		}
开发者ID:johnrom,项目名称:cities-skylines-all-tile-start,代码行数:29,代码来源:AllTileStartMod.cs


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