blob: bb74ebabac35c22c95819739fdec6aa1bbb7dd08 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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)
export var en_passant_tile = false
export var en_passant_kill_tile = false
export var castling_rook = ""
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":
$Rect.color = blue
elif color == "red":
$Rect.color = red
|