Xbox controller, terrains and tilemap layer with physics and worked in gimp

This commit is contained in:
ArunKirupananthan committed 2026-10-20 20:19:38 -04:00
1 parent ea9d513ff8
commit 705127a9ac
15 files changed
+598 -13

No files matched your search

+5 -5
View File
@@ -67,14 +67,14 @@ func handle_input()->void:
#shove left
pushTarget.apply_central_impulse(Vector2(-1,0) * shove_power)
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
current_player_state=PlayerStates.JUMPING
upJump = true
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
direction = Input.get_axis("ui_left", "ui_right")
direction = Input.get_axis("left", "right")
func handle_movement()->void:
if direction:
velocity.x = direction * SPEED
@@ -92,16 +92,16 @@ func handle_collisions()->void:
print("Something on my right")
#get the thing I can shove
var collider = right_cast.get_collider()
if collider is Node:
if collider is RigidBody2D:
pushRightEnabled = true
pushTarget = collider
pushTarget = collider
else:
pushRightEnabled = false
if left_cast.is_colliding():
print("Something on my left")
var collider = left_cast.get_collider()
if collider is Node:
if collider is RigidBody2D:
pushLeftEnabled = true
pushTarget = collider
else: