スクリプト画面を開く

「taro.gd」を選ぶ

_process関数を次に置き換える

ソース 1: カーソルキーの上下左右で移動
func _process(delta):
	# 移動方向・速度をゼロでクリア
	var velocity = Vector2.ZERO
	# Input.is_action_pressed 関数でキーを押しているかチェック出来る
	if Input.is_action_pressed("right"):
		velocity.x = speed
	if Input.is_action_pressed("left"):
		velocity.x = -speed
	if Input.is_action_pressed("down"):
		velocity.y = speed
	if Input.is_action_pressed("up"):
		velocity.y = -speed
	position += velocity*delta
	position = position.clamp(Vector2.ZERO, screen_size)


MyWorldシーンを開いているのを確認してから「現在のシーンを実行」ボタンを押す

TAROが動くのを確認したらゲーム画面を閉じる