lighting, parallax, tilemap

This commit is contained in:
OddlyTimbot committed 2025-05-05 21:06:50 -04:00
1 parent 5e6d16f8b5
commit 54f9fda72e
18 files changed
+640 -17

No files matched your search

+11 -9
View File
@@ -30,16 +30,10 @@ var pushEnabled:bool = false
var upJump:bool = false
func _physics_process(delta: float) -> void:
# Add the gravity.
if current_state == State.JUMP:
# apply normal gravity
velocity += get_gravity() * delta
else:
#apply hard gravity
velocity += get_gravity() * hard_gravity * delta
handle_input()
update_movement()
update_movement(delta)
update_states()
update_animation()
move_and_slide()
@@ -78,7 +72,15 @@ func handle_input() -> void:
direction = Input.get_axis("ui_left", "ui_right")
func update_movement()-> void:
func update_movement(delta)-> void:
# Add the gravity.
if current_state == State.JUMP:
# apply normal gravity
velocity += get_gravity() * delta
else:
#apply hard gravity
velocity += get_gravity() * hard_gravity * delta
if direction:
velocity.x = move_toward(velocity.x, SPEED * direction, acceleration)
if direction <0: