16 lines
514 B
GDScript
16 lines
514 B
GDScript
extends Node2D
|
|
|
|
|
|
func _ready():
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
if Input.is_action_just_pressed("BTN_1") or \
|
|
Input.is_action_just_pressed("BTN_2") or \
|
|
Input.is_action_just_pressed("BTN_3") or \
|
|
Input.is_action_just_pressed("BTN_4") or \
|
|
Input.is_action_just_pressed("BTN_5") or \
|
|
Input.is_action_just_pressed("BTN_6"):
|
|
get_tree().change_scene_to_file("res://scenes/spaceship.tscn")
|