duncgibbs 14e2073322
All checks were successful
linting & formatting / build (push) Successful in 25s
itch.io publish action / build (web, html) (push) Successful in 3m51s
mostly implements networked board state; but also adds voting and a few buildings
2026-04-24 12:19:34 -05:00

36 lines
742 B
GDScript

class_name Turn extends Tile
@export var direction: Board.Direction
@onready var highlight: Panel = %Highlight
@onready var player_border: PanelContainer = %PlayerBorder
func _ready() -> void:
_set_border_color()
func handle_turn_mouse_entered() -> void:
highlight.show()
func handle_turn_mouse_exited() -> void:
highlight.hide()
func handle_gui_input(event: InputEvent):
if event.is_action_pressed("select") and !is_placing:
tile_selected.emit(self)
func _set_player(value: Player) -> void:
super(value)
_set_border_color()
func _set_border_color() -> void:
if !is_node_ready() or player == null:
return
var style_box: StyleBoxFlat = player_border.get_theme_stylebox("panel")
style_box.border_color = player.color