All checks were successful
Quality Check / Linting (push) Successful in 7s
Build Application / build (tower_defence_web, build/*, build, build/index.html, Web) (push) Successful in 14s
Build Application / build (tower_defence.elf, tower_defence.elf, tower_defence.elf, Linux) (push) Successful in 17s
Build Application / build (tower_defence.exe, tower_defence.exe, tower_defence.exe, Windows) (push) Successful in 19s
Build Application / release (push) Successful in 8s
Build Application / build-docker (push) Successful in 10s
13 lines
259 B
GDScript
13 lines
259 B
GDScript
extends Button
|
|
|
|
@export var scene: PackedScene
|
|
|
|
|
|
func _ready() -> void:
|
|
connect("pressed", _on_Button_pressed)
|
|
|
|
|
|
func _on_Button_pressed() -> void:
|
|
if not scene:
|
|
push_error("Scene to switch to is not configured")
|
|
get_tree().change_scene_to_packed(scene)
|