public static void JustTouch(float x, float y) { if (x > 375 && x < 690 && y > 1050 && y < 1150 && !_blockFlag) { Hide(); Result_Solo.Show(false); } }
public static void MovedTouch(float x1, float y1, float x2, float y2) { if (x1 > 375 && x1 < 690 && y1 > 1050 && y1 < 1150 && x2 > 375 && x2 < 690 && y2 > 1050 && y2 < 1150 && !_blockFlag) { Hide(); Result_Solo.Show(false); } Line buff = Methods.DrawLine(x1, y1, x2, y2, _points); if (buff != nLine && !_usedLines.Contains(buff) && !_blockFlag) { _pllines.Add(buff); _pllines.Add(ReverseLine(buff)); _plArr = _pllines.ToArray(); GameView.Instance.Invalidate(); if (!_endGameFlag && IsBotWin()) { _endGameFlag = true; _blockFlag = true; aTimer.Elapsed += new ElapsedEventHandler(OnTimedEventFalse); aTimer.Interval = 3000; aTimer.Enabled = true; return; } if (!_endGameFlag && IsPlayerWin()) { _endGameFlag = true; _blockFlag = true; aTimer.Elapsed += new ElapsedEventHandler(OnTimedEventTrue); aTimer.Interval = 3000; aTimer.Enabled = true; return; } _usedLines.Add(buff); _usedLines.Add(ReverseLine(buff)); TurnSender(); if (!_endGameFlag && IsBotWin()) { _endGameFlag = true; _blockFlag = true; aTimer.Elapsed += new ElapsedEventHandler(OnTimedEventFalse); aTimer.Interval = 3000; aTimer.Enabled = true; return; } if (!_endGameFlag && IsPlayerWin()) { _endGameFlag = true; _blockFlag = true; aTimer.Elapsed += new ElapsedEventHandler(OnTimedEventTrue); aTimer.Interval = 3000; aTimer.Enabled = true; return; } } }
private static void OnTimedEventFalse(object source, ElapsedEventArgs e) { aTimer.Enabled = false; Hide(); Result_Solo.Show(false); }