From 7c804908bc085c8b21b598c784b33636909f0e87 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 19 Sep 2025 13:51:30 -0400 Subject: [Client] Added compass --- client/Archipelago/compass.gd | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 client/Archipelago/compass.gd (limited to 'client/Archipelago/compass.gd') diff --git a/client/Archipelago/compass.gd b/client/Archipelago/compass.gd new file mode 100644 index 0000000..c90475a --- /dev/null +++ b/client/Archipelago/compass.gd @@ -0,0 +1,66 @@ +extends Node2D + +const RADIUS = 48 + +var _font + + +func _ready(): + _font = load("res://assets/fonts/Lingo2.ttf") + + +func _draw(): + draw_circle(Vector2.ZERO, RADIUS, Color(1.0, 1.0, 1.0, 0.8), true) + draw_circle(Vector2.ZERO, RADIUS, Color.BLACK, false) + draw_string( + _font, + Vector2(-4, -RADIUS * 3.0 / 4.0), + "N", + HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, + -1, + 16, + Color.BLACK + ) + draw_set_transform(Vector2.ZERO, PI / 2) + draw_string( + _font, + Vector2(-4, -RADIUS * 3.0 / 4.0), + "E", + HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, + -1, + 16, + Color.BLACK + ) + draw_set_transform(Vector2.ZERO, PI) + draw_string( + _font, + Vector2(-4, -RADIUS * 3.0 / 4.0), + "S", + HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, + -1, + 16, + Color.BLACK + ) + draw_set_transform(Vector2.ZERO, PI * 3.0 / 2.0) + draw_string( + _font, + Vector2(-4, -RADIUS * 3.0 / 4.0), + "W", + HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, + -1, + 16, + Color.BLACK + ) + draw_set_transform(Vector2.ZERO) + draw_colored_polygon( + PackedVector2Array( + [Vector2(0, -RADIUS * 5.0 / 8.0), Vector2(-RADIUS / 6.0, 0), Vector2(RADIUS / 6.0, 0)] + ), + Color.RED + ) + draw_colored_polygon( + PackedVector2Array( + [Vector2(0, RADIUS * 5.0 / 8.0), Vector2(-RADIUS / 6.0, 0), Vector2(RADIUS / 6.0, 0)] + ), + Color.GRAY + ) -- cgit 1.4.1