From ea9aab7c4fbb511131941e0d57255a1998b48d0c Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 29 Sep 2024 20:41:20 +0800 Subject: [PATCH] mobile -> enable combat arrows on 2 player --- forge-gui-mobile/src/forge/Graphics.java | 7 ++++--- forge-gui-mobile/src/forge/screens/match/MatchScreen.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/forge-gui-mobile/src/forge/Graphics.java b/forge-gui-mobile/src/forge/Graphics.java index 36b1089954d..b7ca391d9bf 100644 --- a/forge-gui-mobile/src/forge/Graphics.java +++ b/forge-gui-mobile/src/forge/Graphics.java @@ -320,16 +320,17 @@ public class Graphics { fillCircle(skinColor.getColor(), x2, y2, arrowThickness); drawLineArrow(arrowThickness, skinColor.getColor(), x1, y1, x2, y2); fillCircle(Color.WHITE, x2, y2, arrowThickness / 2); - drawLine(arrowThickness / 3, Color.WHITE, x1, y1, x2, y2); + drawLineArrow(arrowThickness / 3, Color.WHITE, x1, y1, x2, y2); + //drawLine(arrowThickness / 3, Color.WHITE, x1, y1, x2, y2); } public void drawLineArrow(float thickness, Color color, float x1, float y1, float x2, float y2) { batch.end(); //must pause batch while rendering shapes - float angle = new Vector2(x1 - x2, y1 - y2).angleRad(); + /*float angle = new Vector2(x1 - x2, y1 - y2).angleRad(); float arrowHeadRotation = (float) (Math.PI * 0.8f); Vector2 arrowCorner3 = new Vector2(x2 + (thickness / 3) * (float) Math.cos(angle + arrowHeadRotation), y2 + (thickness / 3) * (float) Math.sin(angle + arrowHeadRotation)); - Vector2 arrowCorner4 = new Vector2(x2 + (thickness / 3) * (float) Math.cos(angle - arrowHeadRotation), y2 + (thickness / 3) * (float) Math.sin(angle - arrowHeadRotation)); + Vector2 arrowCorner4 = new Vector2(x2 + (thickness / 3) * (float) Math.cos(angle - arrowHeadRotation), y2 + (thickness / 3) * (float) Math.sin(angle - arrowHeadRotation));*/ if (thickness > 1) { Gdx.gl.glLineWidth(thickness); diff --git a/forge-gui-mobile/src/forge/screens/match/MatchScreen.java b/forge-gui-mobile/src/forge/screens/match/MatchScreen.java index 15d16f0d70d..41528cf4aaa 100644 --- a/forge-gui-mobile/src/forge/screens/match/MatchScreen.java +++ b/forge-gui-mobile/src/forge/screens/match/MatchScreen.java @@ -479,7 +479,7 @@ public class MatchScreen extends FScreen { //draw arrows for combat final CombatView combat = game.getCombat(); for (CardView c : cardsonBattlefield) { - TargetingOverlay.assembleArrows(g, c, endpoints, combat, is4Player() || is3Player() ? playerViewSet : null); + TargetingOverlay.assembleArrows(g, c, endpoints, combat, playerViewSet); } } catch (Exception e) { }