This commit is contained in:
Crizomb 2025-05-15 14:28:08 +02:00
commit b97b3a9ae4
79 changed files with 1729 additions and 0 deletions

View file

@ -0,0 +1,18 @@
extends CharacterBody2D
class_name LanaExo2
@export var speed := 100.0
@export var gravity := 9.8
@export var jump_velocity := -400.0
func _physics_process(delta: float) -> void:
var horizontal : float = Input.get_axis("left", "right")
if not is_on_floor():
velocity.y += gravity
if Input.is_action_just_pressed("jump") && is_on_floor():
velocity.y += jump_velocity
velocity.x = horizontal * speed
move_and_slide()