public static void OnDraw(Canvas canvas) { canvas.DrawColor(Paints.background.Color); Paint ccir = new Paint(); ccir.SetStyle(Paint.Style.Stroke); ccir.AntiAlias = true; ccir.Color = new Color(71, 106, 111); ccir.StrokeWidth = 30 * GameView.Factor; canvas.DrawCircle(360 * GameView.Factor, 640 * GameView.Factor, 300 * GameView.Factor, ccir); Paints.DrawCircle(canvas, 180, 400, 120); //5 Paints.DrawCircle(canvas, 180, 850, 120); //9 Paints.DrawCircle(canvas, 540, 400, 120); //7 Paints.DrawCircle(canvas, 540, 850, 120); //11 Paints.DrawTextMode(canvas, 135, 440, "6", 130, 100); Paints.DrawTextMode(canvas, 110, 893, "10", 130, 100); Paints.DrawTextMode(canvas, 505, 440, "8", 130, 100); Paints.DrawTextMode(canvas, 470, 893, "12", 130, 100); Paints.DrawTextM(canvas, 80, 100, "Choose number", 80, 50); Paints.DrawTextM(canvas, 210, 200, "of points", 80, 50); }
public static void OnDraw(Canvas canvas) { canvas.DrawColor(Paints.background.Color); Circle _circle = new Circle(); _circle.Draw(canvas); Methods.DrawPoints(_points, canvas, _circle); if (_firstArr != null) { for (int i = 0; i < _firstArr.Length; i++) { canvas.DrawLine(_firstArr[i].p1.X * GameView.Factor, _firstArr[i].p1.Y * GameView.Factor, _firstArr[i].p2.X * GameView.Factor, GameView.Factor * _firstArr[i].p2.Y, Paints.plSoloLine); } } if (_secondArr != null) { for (int j = 0; j < _secondArr.Length; j++) { canvas.DrawLine(_secondArr[j].p1.X * GameView.Factor, _secondArr[j].p1.Y * GameView.Factor, _secondArr[j].p2.X * GameView.Factor, GameView.Factor * _secondArr[j].p2.Y, Paints.botSoloLine); } } if (_endGameFlag) { Paints.DrawButtonM(canvas, 100, 40, 620, 200); if (_blueWinner && _firstArr != null) { for (int i = 0; i < _firstArr.Length; i++) { if (i == _ind1 || i == _ind2 || i == _ind3) { canvas.DrawLine(_firstArr[i].p1.X * GameView.Factor, _firstArr[i].p1.Y * GameView.Factor, _firstArr[i].p2.X * GameView.Factor, GameView.Factor * _firstArr[i].p2.Y, Paints.triangle); } } Paints.DrawTextM(canvas, 180, 150, "Red win", 90, 70); } if (_redWinner && _secondArr != null) { for (int j = 0; j < _secondArr.Length; j++) { if (j == _ind1 || j == _ind2 || j == _ind3) { canvas.DrawLine(_secondArr[j].p1.X * GameView.Factor, _secondArr[j].p1.Y * GameView.Factor, _secondArr[j].p2.X * GameView.Factor, GameView.Factor * _secondArr[j].p2.Y, Paints.triangle); } } Paints.DrawTextM(canvas, 180, 150, "Blue win", 90, 70); } } }
public static void OnDraw(Canvas canvas) { canvas.DrawColor(Paints.background.Color); Circle _circle = new Circle(); _circle.Draw(canvas); Methods.DrawPoints(_points, canvas, _circle); Paints.DrawButton(canvas, 375, 1050, 690, 1150); Paints.DrawText(canvas, 385, 1120, "Concede", 75, 50); if (_plArr != null) { for (int i = 0; i < _plArr.Length; i++) { canvas.DrawLine(_plArr[i].p1.X * GameView.Factor, _plArr[i].p1.Y * GameView.Factor, _plArr[i].p2.X * GameView.Factor, GameView.Factor * _plArr[i].p2.Y, Paints.plSoloLine); } } if (_botArr != null) { for (int j = 0; j < _botArr.Length; j++) { canvas.DrawLine(_botArr[j].p1.X * GameView.Factor, _botArr[j].p1.Y * GameView.Factor, _botArr[j].p2.X * GameView.Factor, GameView.Factor * _botArr[j].p2.Y, Paints.botSoloLine); } } if (_endGameFlag) { Paints.DrawButtonM(canvas, 100, 40, 620, 200); Paints.DrawTextM(canvas, 140, 150, "Game over", 90, 70); if (_winner == "bot" && _plArr != null) { for (int i = 0; i < _plArr.Length; i++) { if ((i == _ind1 || i == _ind2 || i == _ind3) && _plArr != null) { canvas.DrawLine(_plArr[i].p1.X * GameView.Factor, _plArr[i].p1.Y * GameView.Factor, _plArr[i].p2.X * GameView.Factor, GameView.Factor * _plArr[i].p2.Y, Paints.triangle); } } } if (_winner == "player" && _botArr != null) { for (int j = 0; j < _botArr.Length; j++) { if ((j == _ind1 || j == _ind2 || j == _ind3) && _botArr != null) { canvas.DrawLine(_botArr[j].p1.X * GameView.Factor, _botArr[j].p1.Y * GameView.Factor, _botArr[j].p2.X * GameView.Factor, GameView.Factor * _botArr[j].p2.Y, Paints.triangle); } } } } }