summaryrefslogtreecommitdiff
path: root/MoveTile.gd
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2023-02-17 14:37:23 -0500
committerjake <jake@jakes-mail.top>2023-02-17 14:37:23 -0500
commitece682cacbb4300897239cd03cc427161788626e (patch)
tree921ff2d09021bca942740f8b719a24ad6e17c70c /MoveTile.gd
parent93f5dbb7e1da18f9146cd6f56b33496378d4aea8 (diff)
Initial Commit
Diffstat (limited to 'MoveTile.gd')
-rw-r--r--MoveTile.gd16
1 files changed, 16 insertions, 0 deletions
diff --git a/MoveTile.gd b/MoveTile.gd
new file mode 100644
index 0000000..5ae65b5
--- /dev/null
+++ b/MoveTile.gd
@@ -0,0 +1,16 @@
+extends Node2D
+
+signal move_clicked
+
+const blue = Color(0.30, 0.71, 0.96, 0.54)
+const red = Color(1.00, 0.00, 0.00, 0.54)
+
+func _on_Area2D_input_event(viewport, event, shape_idx):
+ if event.is_action_pressed("mouse1"):
+ emit_signal("move_clicked")
+
+func set_color(color):
+ if color == "blue":
+ color = blue
+ elif color == "red":
+ color = red