本文整理汇总了C#中IMod.Start方法的典型用法代码示例。如果您正苦于以下问题:C# IMod.Start方法的具体用法?C# IMod.Start怎么用?C# IMod.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMod
的用法示例。
在下文中一共展示了IMod.Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartMod
void StartMod(string name, IMod mod, ModManager m)
{
if (loaded.ContainsKey(name))
{
return;
}
if (modRequirements.ContainsKey(name))
{
foreach (string required_name in modRequirements[name])
{
if (!mods.ContainsKey(required_name))
{
try
{
System.Windows.Forms.MessageBox.Show(string.Format("Can't load mod {0} because its dependency {1} couldn't be loaded.", name, required_name));
}
catch
{
//This will be the case if the server is running on a headless linux server without X11 installed (previously crashed)
Console.WriteLine(string.Format("[Mod error] Can't load mod {0} because its dependency {1} couldn't be loaded.", name, required_name));
}
}
StartMod(required_name, mods[required_name], m);
}
}
mod.Start(m);
loaded[name] = true;
}