Fixed player double jumps not working. and added a dash

This commit is contained in:
2026-02-12 06:56:01 -05:00
parent 83a4a8f374
commit 5518f3ce79
12 changed files with 129 additions and 108 deletions
+13 -11
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=126 format=3 uid="uid://ca7jd0ttc0v67"]
[gd_scene load_steps=127 format=3 uid="uid://ca7jd0ttc0v67"]
[ext_resource type="Script" uid="uid://0oxneml3esdx" path="res://entities/player/player.gd" id="1_8soms"]
[ext_resource type="Script" uid="uid://0oxneml3esdx" path="res://Entities/Player/player.gd" id="1_8soms"]
[ext_resource type="Shader" uid="uid://cqjsw6d71kkd2" path="res://Entities/Player/player_hit_flash_shader.tres" id="2_3ep63"]
[ext_resource type="Texture2D" uid="uid://dravykrek6bsu" path="res://Entities/Player/player_art/the_dude/climbing/player wall slide 48x48.png" id="3_epc1c"]
[ext_resource type="Texture2D" uid="uid://blgt31uqia0oh" path="res://Entities/Player/player_art/the_dude/movement/Player Idle 48x48.png" id="3_gh012"]
@@ -22,6 +22,7 @@
[ext_resource type="Script" uid="uid://d3t3fweggs161" path="res://Entities/Player/player_state_scripts/ground_movement/grab_state.gd" id="23_kjljb"]
[ext_resource type="Script" uid="uid://iu5jv2o1im70" path="res://Entities/Player/player_state_scripts/air_movement/land_state.gd" id="24_bp242"]
[ext_resource type="Script" uid="uid://cmtajhnx8xaqt" path="res://Entities/Player/player_state_scripts/ground_movement/crouch_idle.gd" id="24_brh81"]
[ext_resource type="Script" uid="uid://bhyu62hovn1x3" path="res://Entities/Player/player_state_scripts/air_movement/dash.gd" id="25_01ng6"]
[ext_resource type="Script" uid="uid://cywssm5t3d5uv" path="res://Entities/Player/player_state_scripts/ground_movement/slide_state.gd" id="26_bp242"]
[ext_resource type="Script" uid="uid://c2lag80wot5k" path="res://Entities/Player/player_state_scripts/ground_movement/crouch_walk_state.gd" id="28_y6drd"]
@@ -1007,13 +1008,6 @@ _data = {
[node name="Player" type="CharacterBody2D" groups=["Player"]]
collision_layer = 2
script = ExtResource("1_8soms")
speed = null
maxSpeed = null
friction = null
airFriction = null
jumpHight = null
maxJumpCount = null
ammo = null
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_rqcxa")
@@ -1090,21 +1084,24 @@ script = ExtResource("15_rqcxa")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="Jump" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox")]
[node name="Jump" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "fallState")]
script = ExtResource("14_kjljb")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
wallCheck = NodePath("../../HitBoxes/WallCheck")
floorCheck = NodePath("../../HitBoxes/FloorCheck")
ledgeGrabBox = NodePath("../../LedgeGrab")
fallState = NodePath("../Fall")
[node name="Fall" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox")]
[node name="Fall" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "jumpState")]
script = ExtResource("14_3ep63")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
wallCheck = NodePath("../../HitBoxes/WallCheck")
floorCheck = NodePath("../../HitBoxes/FloorCheck")
ledgeGrabBox = NodePath("../../LedgeGrab")
jumpState = NodePath("../Jump")
coyoteTime = 0.3
[node name="Land" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("24_bp242")
@@ -1137,6 +1134,11 @@ player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
[node name="Dash" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("25_01ng6")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="HitAnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_usp30")