generated from krampus/template-godot4
17 lines
404 B
GDScript3
17 lines
404 B
GDScript3
|
|
class_name Game extends Node
|
||
|
|
|
||
|
|
@onready var game_container: Node2D = %Game
|
||
|
|
@onready var board: Board = %Board
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
get_tree().paused = true
|
||
|
|
|
||
|
|
func handle_tile_selected(tile: Tile):
|
||
|
|
board.set_active_tile(tile)
|
||
|
|
|
||
|
|
func handle_building_selected(building: Building) -> void:
|
||
|
|
board.set_active_building(building)
|
||
|
|
|
||
|
|
func place_walls() -> void:
|
||
|
|
board.is_placing_walls = !board.is_placing_walls
|