Initial set up for topdown game

This commit is contained in:
winniewk committed 2026-04-02 17:08:20 -04:00
commit eaeed156cb
18 files changed
+1170

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
+1
View File
@@ -0,0 +1 @@
uid://bpb21r1tnvt70
+19
View File
@@ -0,0 +1,19 @@
extends CharacterBody2D
@onready var animationPlayer = $AnimatedSprite2D
const SPEED = 175
func _process(_delta):
velocity = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown") * SPEED
move_and_slide()
if Input.is_action_pressed("moveUp"):
animationPlayer.play("walk_up")
elif Input.is_action_pressed("moveDown"):
animationPlayer.play("walk_down")
elif Input.is_action_pressed("moveLeft"):
animationPlayer.play("walk_left")
elif Input.is_action_pressed("moveRight"):
animationPlayer.play("walk_right")
else:
animationPlayer.stop()
+1
View File
@@ -0,0 +1 @@
uid://433o2c0j2ci7