Fix gyroscope feature

This commit is contained in:
VAILLANT Jeremy
2021-05-13 13:31:14 +02:00
parent 8915ebf03f
commit 6728ee04ce
4 changed files with 51 additions and 56 deletions
-8
View File
@@ -15,14 +15,6 @@ func _ready():
$Grid/Menu/Action/About.text = tr("MAIN_BUTTON_ABOUT")
$Grid/Menu/Action/Quit.text = tr("MAIN_BUTTON_QUIT")
func _process(delta):
var gyroscope = Input.get_gyroscope().abs()
var value = Vector2(gyroscope[0], gyroscope[1])
if value[0] > value_old[0] + max_diff and value[1] > value_old[1] + max_diff:
print("[main#_process] " + String(value))
value_old = value
# Quit the game
func _on_Quit_pressed():
get_tree().quit(0)