wall kicks can work
This commit is contained in:
parent
1895b3b10b
commit
638495f4a3
5 changed files with 83 additions and 4 deletions
|
@ -117,6 +117,8 @@ run_acceleration = 200.0
|
|||
max_run_speed = 100.0
|
||||
turn_acceleration = 300.0
|
||||
stopping_force = 250.0
|
||||
bonk_speed_threshold = 75.0
|
||||
bonk_power = 80.0
|
||||
gravity = 450.0
|
||||
fast_gravity = 675.0
|
||||
jump_power = 180.0
|
||||
|
@ -144,7 +146,6 @@ texture = ExtResource("3_trcll")
|
|||
offset = Vector2(0, -2)
|
||||
hframes = 8
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Idle" type="Node" parent="Graphics/Sprite"]
|
||||
|
@ -154,6 +155,14 @@ script = ExtResource("4_bsdw5")
|
|||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(1, 0)
|
||||
|
||||
[node name="Bonk" type="Node" parent="Graphics/Sprite"]
|
||||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(3, 0)
|
||||
|
||||
[node name="StunnedFall" type="Node" parent="Graphics/Sprite"]
|
||||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(3, 2)
|
||||
|
||||
[node name="Skid" type="Node" parent="Graphics/Sprite"]
|
||||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(2, 0)
|
||||
|
@ -273,6 +282,12 @@ editor_description = "Player is standing on a floor."
|
|||
script = ExtResource("6_jnxnd")
|
||||
initial_state = NodePath("Standing")
|
||||
|
||||
[node name="on Bonked" type="Node" parent="StateChart/Root/Grounded"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../Floating/Bonk")
|
||||
event = &"bonked"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="on JumpPressed" type="Node" parent="StateChart/Root/Grounded"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../Airborne/Jumping")
|
||||
|
@ -381,6 +396,12 @@ to = NodePath("../../../Floating/ChompVault")
|
|||
event = &"corner_detected"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="on Bonked" type="Node" parent="StateChart/Root/Airborne/Falling"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Floating/Bonk")
|
||||
event = &"bonked"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Jumping" type="Node" parent="StateChart/Root/Airborne"]
|
||||
editor_description = "Player has jumped and is rising."
|
||||
script = ExtResource("6_jnxnd")
|
||||
|
@ -399,6 +420,12 @@ to = NodePath("../../../Floating/ChompVault")
|
|||
event = &"corner_detected"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="on Bonked" type="Node" parent="StateChart/Root/Airborne/Jumping"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Floating/Bonk")
|
||||
event = &"bonked"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="FromGround" type="Node" parent="StateChart/Root/Airborne/Jumping"]
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
|
@ -416,6 +443,15 @@ to = NodePath("../../../Floating/Splat")
|
|||
event = &"splatted"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="StunnedFalling" type="Node" parent="StateChart/Root/Airborne"]
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
[node name="on Bonked" type="Node" parent="StateChart/Root/Airborne/StunnedFalling"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Floating/Bonk")
|
||||
event = &"bonked"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Floating" type="Node" parent="StateChart/Root"]
|
||||
script = ExtResource("6_jnxnd")
|
||||
initial_state = NodePath("UnSplat")
|
||||
|
@ -447,7 +483,7 @@ to = NodePath("../../../Airborne/Falling")
|
|||
event = &"grab_pressed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="on TimeOut" type="Node" parent="StateChart/Root/Floating/Splat"]
|
||||
[node name="on Timeout" type="Node" parent="StateChart/Root/Floating/Splat"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../UnSplat")
|
||||
delay_in_seconds = "0.75"
|
||||
|
@ -461,9 +497,24 @@ script = ExtResource("7_rgjdc")
|
|||
to = NodePath("../../../Airborne/Falling")
|
||||
delay_in_seconds = "0.25"
|
||||
|
||||
[node name="Bonk" type="Node" parent="StateChart/Root/Floating"]
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
[node name="on Timeout" type="Node" parent="StateChart/Root/Floating/Bonk"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Airborne/StunnedFalling")
|
||||
delay_in_seconds = "0.2"
|
||||
|
||||
[node name="on JumpPressed" type="Node" parent="StateChart/Root/Floating/Bonk"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Airborne/Jumping/FromGround")
|
||||
event = &"jump_pressed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[connection signal="finished" from="Graphics/Sprite/ChompVault" to="StateChart/Root/Floating/ChompVault/on AnimationFinished" method="take"]
|
||||
[connection signal="taken" from="StateChart/Root/on Killed" to="." method="_reset_position"]
|
||||
[connection signal="taken" from="StateChart/Root/on Killed" to="Sounds/Death" method="play"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Grounded" to="." method="_check_for_bonk"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Grounded/Standing/Idle" to="Graphics/Sprite/Idle" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Grounded/Standing/Stopping" to="Graphics/Sprite/Run" method="play"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Grounded/Standing/Stopping" to="." method="_slow_to_stop"]
|
||||
|
@ -475,6 +526,7 @@ delay_in_seconds = "0.25"
|
|||
[connection signal="state_physics_processing" from="StateChart/Root/Grounded/Turning" to="." method="_apply_turn_acceleration"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne" to="." method="_apply_gravity"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne" to="." method="_check_for_corner"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne" to="." method="_check_for_bonk"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Airborne/Falling" to="Graphics/Sprite/Fall" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Airborne/Jumping" to="Graphics/Sprite/Jump" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Airborne/Jumping/FromGround" to="." method="_start_jump"]
|
||||
|
@ -486,6 +538,7 @@ delay_in_seconds = "0.25"
|
|||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_check_for_splat"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_face_towards_velocity"]
|
||||
[connection signal="taken" from="StateChart/Root/Airborne/Missile/on Splatted" to="Sounds/HitWall" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Airborne/StunnedFalling" to="Graphics/Sprite/StunnedFall" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/ChompVault" to="." method="_start_chomp_vault"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/ChompVault" to="Graphics/Sprite/ChompVault" method="play"]
|
||||
[connection signal="taken" from="StateChart/Root/Floating/ChompVault/on AnimationFinished" to="." method="_end_chomp_vault"]
|
||||
|
@ -494,3 +547,7 @@ delay_in_seconds = "0.25"
|
|||
[connection signal="taken" from="StateChart/Root/Floating/Splat/on GrabPressed" to="." method="_restore_graphics_rotation"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/UnSplat" to="Graphics/Sprite/UnSplat" method="play"]
|
||||
[connection signal="state_exited" from="StateChart/Root/Floating/UnSplat" to="." method="_restore_graphics_rotation"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/Bonk" to="." method="_enter_bonk"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/Bonk" to="Graphics/Sprite/Bonk" method="play"]
|
||||
[connection signal="taken" from="StateChart/Root/Floating/Bonk/on Timeout" to="." method="_apply_bonk"]
|
||||
[connection signal="taken" from="StateChart/Root/Floating/Bonk/on JumpPressed" to="." method="_cancel_bonk"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue