diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-19 13:51:30 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-19 13:51:30 -0400 |
commit | 7c804908bc085c8b21b598c784b33636909f0e87 (patch) | |
tree | 48fd7c37cc90b73c476603c8b1e180132b297db4 /client/Archipelago/compass.gd | |
parent | 9933a357400538b2f73848dceab7d859ee20c8d9 (diff) | |
download | lingo2-archipelago-7c804908bc085c8b21b598c784b33636909f0e87.tar.gz lingo2-archipelago-7c804908bc085c8b21b598c784b33636909f0e87.tar.bz2 lingo2-archipelago-7c804908bc085c8b21b598c784b33636909f0e87.zip |
[Client] Added compass
Diffstat (limited to 'client/Archipelago/compass.gd')
-rw-r--r-- | client/Archipelago/compass.gd | 66 |
1 files changed, 66 insertions, 0 deletions
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 @@ | |||
1 | extends Node2D | ||
2 | |||
3 | const RADIUS = 48 | ||
4 | |||
5 | var _font | ||
6 | |||
7 | |||
8 | func _ready(): | ||
9 | _font = load("res://assets/fonts/Lingo2.ttf") | ||
10 | |||
11 | |||
12 | func _draw(): | ||
13 | draw_circle(Vector2.ZERO, RADIUS, Color(1.0, 1.0, 1.0, 0.8), true) | ||
14 | draw_circle(Vector2.ZERO, RADIUS, Color.BLACK, false) | ||
15 | draw_string( | ||
16 | _font, | ||
17 | Vector2(-4, -RADIUS * 3.0 / 4.0), | ||
18 | "N", | ||
19 | HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, | ||
20 | -1, | ||
21 | 16, | ||
22 | Color.BLACK | ||
23 | ) | ||
24 | draw_set_transform(Vector2.ZERO, PI / 2) | ||
25 | draw_string( | ||
26 | _font, | ||
27 | Vector2(-4, -RADIUS * 3.0 / 4.0), | ||
28 | "E", | ||
29 | HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, | ||
30 | -1, | ||
31 | 16, | ||
32 | Color.BLACK | ||
33 | ) | ||
34 | draw_set_transform(Vector2.ZERO, PI) | ||
35 | draw_string( | ||
36 | _font, | ||
37 | Vector2(-4, -RADIUS * 3.0 / 4.0), | ||
38 | "S", | ||
39 | HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, | ||
40 | -1, | ||
41 | 16, | ||
42 | Color.BLACK | ||
43 | ) | ||
44 | draw_set_transform(Vector2.ZERO, PI * 3.0 / 2.0) | ||
45 | draw_string( | ||
46 | _font, | ||
47 | Vector2(-4, -RADIUS * 3.0 / 4.0), | ||
48 | "W", | ||
49 | HorizontalAlignment.HORIZONTAL_ALIGNMENT_LEFT, | ||
50 | -1, | ||
51 | 16, | ||
52 | Color.BLACK | ||
53 | ) | ||
54 | draw_set_transform(Vector2.ZERO) | ||
55 | draw_colored_polygon( | ||
56 | PackedVector2Array( | ||
57 | [Vector2(0, -RADIUS * 5.0 / 8.0), Vector2(-RADIUS / 6.0, 0), Vector2(RADIUS / 6.0, 0)] | ||
58 | ), | ||
59 | Color.RED | ||
60 | ) | ||
61 | draw_colored_polygon( | ||
62 | PackedVector2Array( | ||
63 | [Vector2(0, RADIUS * 5.0 / 8.0), Vector2(-RADIUS / 6.0, 0), Vector2(RADIUS / 6.0, 0)] | ||
64 | ), | ||
65 | Color.GRAY | ||
66 | ) | ||