Files

31 lines
840 B
GDScript
Raw Permalink Normal View History

2024-10-27 21:31:14 +01:00
extends Node2D
@export var speed: float = 100.0
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
2024-10-28 12:27:17 +01:00
if Input.is_action_pressed("move_right"):
2024-10-27 21:31:14 +01:00
position.x += speed * delta
2024-10-28 12:27:17 +01:00
if Input.is_action_pressed("move_left"):
2024-10-27 21:31:14 +01:00
position.x -= speed * delta
2024-10-28 12:27:17 +01:00
if Input.is_action_pressed("move_up"):
2024-10-27 21:31:14 +01:00
position.y -= speed * delta
2024-10-28 12:27:17 +01:00
if Input.is_action_pressed("move_down"):
2024-10-27 21:31:14 +01:00
position.y += speed * delta
2024-10-28 12:27:17 +01:00
if Input.is_action_just_pressed("ui_up"):
2024-10-28 12:06:03 +01:00
Dialogic.start("test_time_line")
2024-10-28 12:27:17 +01:00
if Input.is_action_just_pressed("ui_down"):
if TranslationServer.get_locale() == "en":
TranslationServer.set_locale("de")
else:
TranslationServer.set_locale("en")
2024-10-27 21:31:14 +01:00
pass