added ladder script

This commit is contained in:
derek
2025-06-16 16:39:24 -05:00
parent be26131b39
commit 07ea71a3ed
9 changed files with 608 additions and 55 deletions

View File

@@ -6,8 +6,8 @@
size = Vector3(1, 10, 1)
[node name="LadderCollisionCheck" type="Area3D"]
collision_layer = 2
collision_mask = 2
collision_layer = 6
collision_mask = 6
script = ExtResource("1_ugi45")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
@@ -17,5 +17,8 @@ shape = SubResource("BoxShape3D_gxu3i")
[node name="CollisionMidpoint" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 0)
[node name="LadderPlayerPos" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.435783)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=43 format=3 uid="uid://drwae3loscbw7"]
[gd_scene load_steps=44 format=3 uid="uid://drwae3loscbw7"]
[ext_resource type="Script" uid="uid://bieeh1iro4ji1" path="res://scripts/player.gd" id="1_x7wms"]
[ext_resource type="Script" uid="uid://linvnr16djav" path="res://scripts/PlayerStateMachine.gd" id="2_1npgd"]
@@ -12,6 +12,7 @@
[ext_resource type="Script" uid="uid://bgj2bqb5dys41" path="res://scripts/player_wall_running.gd" id="6_1npgd"]
[ext_resource type="Script" uid="uid://boyl3qkg4j4vc" path="res://scripts/player_ground_pound.gd" id="7_2asft"]
[ext_resource type="AudioStream" uid="uid://bki17g7j4kqn4" path="res://assets/Audio/PickupSound Mixdown 3.wav" id="8_dwqsx"]
[ext_resource type="Script" uid="uid://bb7u0nnktowwp" path="res://scripts/player_on_ladder.gd" id="8_vgdha"]
[ext_resource type="Shader" uid="uid://djbvmc8hurccm" path="res://assets/Shaders/speedlines.gdshader" id="10_5hu7c"]
[ext_resource type="AudioStream" uid="uid://dyd272r7n2ecd" path="res://assets/Audio/footsteps-shoes-jump-land-beach-sand-SBA-300118001.wav" id="10_tn0pn"]
[ext_resource type="AudioStream" uid="uid://cjpvibojo13qv" path="res://assets/Audio/clock-ticking-exact-looping-SBA-300062891.wav" id="11_6k4fy"]
@@ -140,36 +141,39 @@ script = ExtResource("1_x7wms")
SENSITIVITY = 0.008
weapon_holder = NodePath("Head/Recoil/Camera3D/WeaponHolder")
[node name="States" type="Node" parent="." node_paths=PackedStringArray("character", "initial_state")]
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("character", "initial_state")]
script = ExtResource("2_1npgd")
character = NodePath("..")
initial_state = NodePath("On Foot")
[node name="On Foot" type="Node" parent="States"]
[node name="On Foot" type="Node" parent="StateMachine"]
script = ExtResource("3_ib4e7")
metadata/_custom_type_script = "uid://dk0vg5btak80a"
[node name="Crouched" type="Node" parent="States"]
[node name="Crouched" type="Node" parent="StateMachine"]
script = ExtResource("4_67mtf")
move_speed = 5.0
move_transition_speed = 4.0
[node name="In Air" type="Node" parent="States"]
[node name="In Air" type="Node" parent="StateMachine"]
script = ExtResource("5_m0ick")
[node name="Wall Running" type="Node" parent="States"]
[node name="Wall Running" type="Node" parent="StateMachine"]
script = ExtResource("6_1npgd")
move_speed = 15.0
move_transition_speed = 15.0
[node name="Ground Pound" type="Node" parent="States"]
[node name="Ground Pound" type="Node" parent="StateMachine"]
script = ExtResource("7_2asft")
[node name="Knocked" type="Node" parent="States"]
[node name="Knocked" type="Node" parent="StateMachine"]
[node name="Stunned" type="Node" parent="States"]
[node name="Stunned" type="Node" parent="StateMachine"]
[node name="On Ladder" type="Node" parent="States"]
[node name="On Ladder" type="Node" parent="StateMachine"]
script = ExtResource("8_vgdha")
move_speed = 5.0
move_transition_speed = 3.0
can_climb_new_ladder = false
[node name="HealthIndicator" type="ColorRect" parent="."]
material = SubResource("CanvasItemMaterial_l5ga0")