本文整理汇总了C#中Main.autoCreate方法的典型用法代码示例。如果您正苦于以下问题:C# Main.autoCreate方法的具体用法?C# Main.autoCreate怎么用?C# Main.autoCreate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Main
的用法示例。
在下文中一共展示了Main.autoCreate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadServerParameters
//.........这里部分代码省略.........
"-players"
})) != null && int.TryParse(s2, out netPlayers))
{
game.SetNetPlayers(netPlayers);
}
string serverPassword;
if ((serverPassword = LaunchInitializer.TryParameter(new string[]
{
"-pass",
"-password"
})) != null)
{
Netplay.ServerPassword = serverPassword;
}
string s3;
int lang;
if ((s3 = LaunchInitializer.TryParameter(new string[]
{
"-lang"
})) != null && int.TryParse(s3, out lang))
{
Lang.lang = lang;
}
string worldName;
if ((worldName = LaunchInitializer.TryParameter(new string[]
{
"-worldname"
})) != null)
{
game.SetWorldName(worldName);
}
string newMOTD;
if ((newMOTD = LaunchInitializer.TryParameter(new string[]
{
"-motd"
})) != null)
{
game.NewMOTD(newMOTD);
}
string banFilePath;
if ((banFilePath = LaunchInitializer.TryParameter(new string[]
{
"-banlist"
})) != null)
{
Netplay.BanFilePath = banFilePath;
}
if (LaunchInitializer.HasParameter(new string[]
{
"-autoshutdown"
}))
{
game.EnableAutoShutdown();
}
if (LaunchInitializer.HasParameter(new string[]
{
"-secure"
}))
{
Netplay.spamCheck = true;
}
string worldSize;
if ((worldSize = LaunchInitializer.TryParameter(new string[]
{
"-autocreate"
})) != null)
{
game.autoCreate(worldSize);
}
if (LaunchInitializer.HasParameter(new string[]
{
"-noupnp"
}))
{
Netplay.UseUPNP = false;
}
string world;
if ((world = LaunchInitializer.TryParameter(new string[]
{
"-world"
})) != null)
{
game.SetWorld(world, false);
}
else if (SocialAPI.Mode == SocialMode.Steam && (world = LaunchInitializer.TryParameter(new string[]
{
"-cloudworld"
})) != null)
{
game.SetWorld(world, true);
}
string configPath;
if ((configPath = LaunchInitializer.TryParameter(new string[]
{
"-config"
})) != null)
{
game.LoadDedConfig(configPath);
}
}