Tough_Crowd/godot/scenes/tutorial.gd

22 lines
466 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 12:47:32 +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 12:47:32 +00:00
pass
2024-01-28 10:28:47 +00:00
func _input(event):
2024-01-28 12:47:32 +00:00
if event.is_action_pressed("interact"):
change_scene()
2024-01-28 06:28:55 +00:00
func _on_button_pressed():
2024-01-28 12:47:32 +00:00
change_scene()
2024-01-28 10:28:47 +00:00
func change_scene():
2024-01-28 12:47:32 +00:00
get_tree().change_scene_to_packed(next_scene)