本文整理汇总了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;
}
}
}
示例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);
}
}
}
}