本文整理汇总了C#中GameEngine.Debug方法的典型用法代码示例。如果您正苦于以下问题:C# GameEngine.Debug方法的具体用法?C# GameEngine.Debug怎么用?C# GameEngine.Debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameEngine
的用法示例。
在下文中一共展示了GameEngine.Debug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeMove
private void MakeMove(GameEngine game, int x1, int y1, int x2, int y2)
{
int primaryDelay = MAX_DELAY;
if (!(CheckDelay(x1, y1) && CheckDelay(x2, y2)))
return;
//if (debugMode)
//game.Debug(String.Format("Move made: {0},{1} - {2},{3}", new Object[] { x1 - 2, y1 - 2, x2 - 2, y2 - 2 }));
// debugConsole.AppendText(String.Format("Move made: {0},{1} - {2},{3}", new Object[] { x1 - 2, y1 - 2, x2 - 2, y2 - 2 }) + System.Environment.NewLine);
if (!game.GameExtents.HasValue)
return; // Last minute catch to ensure we have accurate location for mouse clicks
SetDelay(x1, y1, primaryDelay);
Rectangle startPoint = game.GameExtents.Value;
startPoint.X += BoardLocationOnGame.X;
startPoint.Y += BoardLocationOnGame.Y;
int mouseX1 = startPoint.X + (CellSize * (x1 - 3)) + (CellSize / 2);
int mouseY1 = startPoint.Y + (CellSize * (y1 - 3)) + (CellSize / 2);
int mouseX2 = startPoint.X + (CellSize * (x2 - 3)) + (CellSize / 2);
int mouseY2 = startPoint.Y + (CellSize * (y2 - 3)) + (CellSize / 2);
//System.Threading.Thread.Sleep(10);
SendInputClass.Click(mouseX1, mouseY1);
//System.Threading.Thread.Sleep(10);
SendInputClass.Click(mouseX2, mouseY2);
//System.Threading.Thread.Sleep(10);
game.Debug(string.Format("clickX: {0}, clickY: {1}", mouseX1, mouseY1));
//Thread.Sleep(1500);
SendInputClass.Click(startPoint.X - 90, startPoint.Y + 150);
}