added falling

This commit is contained in:
Booklordofthedings 2024-08-16 21:42:27 +02:00
parent 5510d89edc
commit bd91fb7117
10 changed files with 147 additions and 5 deletions

View file

@ -1,6 +1,7 @@
extends CharacterBody2D
@export var speed = 50
@export var gravity = 50
func get_input():
var input_direction = Input.get_axis("player_left", "player_right")
@ -8,4 +9,5 @@ func get_input():
func _physics_process(delta):
get_input()
velocity.y += gravity
move_and_slide()