Tough_Crowd/godot/scenes/tutorial.gd

22 lines
487 B
GDScript3
Raw Normal View History

2024-01-28 06:28:55 +00:00
extends Node2D
@export var next_scene: PackedScene
# Called when the node enters the scene tree for the first time.
func _ready():
2024-01-28 10:28:47 +00:00
pass # Replace with function body.
2024-01-28 06:28:55 +00:00
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
2024-01-28 10:28:47 +00:00
pass
func _input(event):
if event.is_action_pressed("interact"):
change_scene()
2024-01-28 06:28:55 +00:00
func _on_button_pressed():
2024-01-28 10:28:47 +00:00
change_scene()
func change_scene():
get_tree().change_scene_to_packed(next_scene)