Simple 2D game based on avoiding asteroids while controlling a rocket
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
var time = 0
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
time += delta
|
|
|
|
rotation = sin(2*time)/10
|
|
|
|
|
|
|
|
func _input(event):
|
|
|
|
if event is InputEventScreenTouch:
|
|
|
|
if event.pressed == true:
|
|
|
|
get_tree().change_scene("res://Game Scenes/Game.tscn")
|
|
|
|
elif event is InputEventKey:
|
|
|
|
if event.pressed and event.scancode == KEY_SPACE:
|
|
|
|
get_tree().change_scene("res://Game Scenes/Game.tscn")
|