本文整理汇总了C#中IStep.getTypeOfStep方法的典型用法代码示例。如果您正苦于以下问题:C# IStep.getTypeOfStep方法的具体用法?C# IStep.getTypeOfStep怎么用?C# IStep.getTypeOfStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IStep
的用法示例。
在下文中一共展示了IStep.getTypeOfStep方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NextTurn
internal void NextTurn()
{
CurrentBot = 1;
Step1 = Bot1.Mind.doSmth();
CurrentBot = 2;
Step2 = Bot2.Mind.doSmth();
//обработка стрельбы
if (Step1.getTypeOfStep() == Steps.BLASTER)
{
if (Bot1.canShoot && map.canBlasterShootBeetween(Bot1.Position, Step1.getCoord()))
{
if (Step1.getCoord().X1 == Bot1.Position.X1 && Step1.getCoord().Y1 == Bot1.Position.Y1)
{
Bot1.Health -= 10;
}
else
{
if (Step1.getCoord().X1 == Bot2.Position.X1 && Step1.getCoord().Y1 == Bot2.Position.Y1)
{
Bot2.Health -= 10;
Bot1.Points += 5;
}
else
{
}
}
}
else
{
BotLose = 1;
reason = "Бот 1 не может стрелять сюда бластером";
}
}
if (Step1.getTypeOfStep() == Steps.ROCKET)
{
if (Bot1.canShoot)
{
if (Step1.getCoord().X1 == Bot1.Position.X1 && Step1.getCoord().Y1 == Bot1.Position.Y1)
{
Bot1.Health -= 50;
Bot1.TurnsToShoot = 5;
}
else
{
if (Step1.getCoord().X1 == Bot2.Position.X1 && Step1.getCoord().Y1 == Bot2.Position.Y1)
{
Bot2.Health -= 50;
Bot1.Points += 25;
Bot1.TurnsToShoot = 5;
}
else
{
Bot1.TurnsToShoot = 5;
}
}
}
else
{
BotLose = 1;
reason = "Бот 1 не может стрелять сюда ракетой";
}
}
if (Step2.getTypeOfStep() == Steps.BLASTER)
{
if (Bot2.canShoot && map.canBlasterShootBeetween(Bot2.Position, Step2.getCoord()))
{
if (Step2.getCoord().X1 == Bot2.Position.X1 && Step2.getCoord().Y1 == Bot2.Position.Y1)
{
Bot2.Health -= 10;
}
else
{
if (Step2.getCoord().X1 == Bot1.Position.X1 && Step2.getCoord().Y1 == Bot1.Position.Y1)
{
Bot1.Health -= 10;
Bot2.Points += 5;
}
else
{
}
}
}
else
{
BotLose = 2;
reason = "Бот 2 не может стрелять сюда бластером";
}
}
if (Step2.getTypeOfStep() == Steps.ROCKET)
{
if (Bot2.canShoot)
{
if (Step2.getCoord().X1 == Bot2.Position.X1 && Step2.getCoord().Y1 == Bot2.Position.Y1)
//.........这里部分代码省略.........