Movement Implemented + Map

This commit is contained in:
Patrick_Pluto 2024-06-13 13:29:05 +02:00
parent bf0b325a81
commit d31d027b80
12 changed files with 227 additions and 0 deletions

4
scripts/menu.gd Normal file
View file

@ -0,0 +1,4 @@
extends Node
func _on_pressed():
get_tree().change_scene_to_file("res://scenes/test/map.tscn")

11
scripts/player.gd Normal file
View file

@ -0,0 +1,11 @@
extends CharacterBody2D
@export var speed = 200
func get_input():
var input_direction = Input.get_vector("left", "right", "up", "down")
velocity = input_direction * speed
func _physics_process(delta):
get_input()
move_and_slide()