本文整理汇总了C#中Terrain.ConstructAndStartGame方法的典型用法代码示例。如果您正苦于以下问题:C# Terrain.ConstructAndStartGame方法的具体用法?C# Terrain.ConstructAndStartGame怎么用?C# Terrain.ConstructAndStartGame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Terrain
的用法示例。
在下文中一共展示了Terrain.ConstructAndStartGame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
Console.WriteLine("ENTER: 1 -> AutoPlayer; 2-> InteractivePlayer; 3->InteractiveWithMonters; 0->exit");
Terrain terrain = new Terrain();
IActor James;
switch (Console.ReadLine())
{
case "0":
Environment.Exit(1);
break;
case "1":
James = new Actor();
James.Name = "James";
terrain.ConstructAndStartGame(James, new PlayerAutoExploreStrategy(), @"ConfigurationFiles\TerrainGraph.xml");
break;
case "2":
James = new Player();
James.ConstuctActor(@"ConfigurationFiles\PlayerConfiguration.xml");
terrain.ConstructAndStartGame(James, new InteractiveStrategy(), @"ConfigurationFiles\InteractiveTerrainGraph.xml");
break;
case "3":
James = new Player();
James.ConstuctActor(@"ConfigurationFiles\PlayerConfiguration.xml");
terrain.ConstructAndStartGame(James, new MultiCreatureAndExploreStrategy(new InteractiveStrategy()), @"ConfigurationFiles\MultiCreaturesTerrain.xml");
Console.WriteLine("With Monsters");
break;
default:
Console.WriteLine("Not valid choise. To Start again press 1 and then enter");
if (Console.ReadLine() == "1")
Main(args);
break;
}
Console.ReadKey();
}