final commit :)

This commit is contained in:
2026-02-23 18:19:36 -05:00
parent 1db31ee39a
commit 4b596c2a96
23 changed files with 478 additions and 156 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=127 format=3 uid="uid://ca7jd0ttc0v67"]
[gd_scene format=3 uid="uid://ca7jd0ttc0v67"]
[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"]
@@ -776,14 +776,14 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/3/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [4.0]
"values": [Vector2(0, -10)]
}
tracks/4/type = "value"
tracks/4/imported = false
@@ -795,19 +795,19 @@ tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [18.0]
"values": [10.0]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/5/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, -10)]
"values": [4.0]
}
[sub_resource type="Animation" id="Animation_epc1c"]
@@ -816,62 +816,62 @@ length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [4.0]
"values": [26.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [26.0]
"values": [4.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("WalkHitBox:shape:radius")
tracks/2/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [6.0]
"values": [Vector2(0, -15)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("WalkHitBox:shape:height")
tracks/3/path = NodePath("WalkHitBox:shape:radius")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [30.0]
"values": [6.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/4/path = NodePath("WalkHitBox:shape:height")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, -15)]
"values": [30.0]
}
tracks/5/type = "value"
tracks/5/imported = false
@@ -891,62 +891,62 @@ length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/0/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [4.0]
"values": [26.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:height")
tracks/1/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [26.0]
"values": [4.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("WalkHitBox:shape:radius")
tracks/2/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [6.0]
"values": [Vector2(0, -15)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("WalkHitBox:shape:height")
tracks/3/path = NodePath("WalkHitBox:shape:radius")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [30.0]
"values": [6.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("HitBoxes/HurtBox/CollisionShape2D:position")
tracks/4/path = NodePath("WalkHitBox:shape:height")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, -15)]
"values": [30.0]
}
tracks/5/type = "value"
tracks/5/imported = false
@@ -1005,11 +1005,11 @@ _data = {
&"hit": SubResource("Animation_2mv0n")
}
[node name="Player" type="CharacterBody2D" groups=["Player"]]
[node name="Player" type="CharacterBody2D" unique_id=1798592382 groups=["Player"]]
collision_layer = 2
script = ExtResource("1_8soms")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=816774718]
material = SubResource("ShaderMaterial_rqcxa")
position = Vector2(0, -16)
sprite_frames = SubResource("SpriteFrames_usp30")
@@ -1018,73 +1018,71 @@ autoplay = "Idle"
frame = 3
frame_progress = 0.8699081
[node name="WalkHitBox" type="CollisionShape2D" parent="."]
[node name="WalkHitBox" type="CollisionShape2D" parent="." unique_id=263731821]
position = Vector2(0, -15)
shape = SubResource("CapsuleShape2D_0e4oy")
[node name="LedgeGrab" type="CollisionShape2D" parent="."]
[node name="LedgeGrab" type="CollisionShape2D" parent="." unique_id=1217724181]
visible = false
position = Vector2(0, -27)
shape = SubResource("RectangleShape2D_kjljb")
[node name="HitBoxes" type="Node2D" parent="."]
[node name="HitBoxes" type="Node2D" parent="." unique_id=745233801]
visible = false
[node name="FloorCheck" type="RayCast2D" parent="HitBoxes"]
[node name="FloorCheck" type="RayCast2D" parent="HitBoxes" unique_id=1291008332]
visible = false
position = Vector2(0, -19)
target_position = Vector2(0, 29)
[node name="TopCheck" type="ShapeCast2D" parent="HitBoxes"]
[node name="TopCheck" type="ShapeCast2D" parent="HitBoxes" unique_id=1788346164]
visible = false
position = Vector2(0, -30)
shape = SubResource("RectangleShape2D_ib3u0")
target_position = Vector2(0, 0)
[node name="WallCheck" type="ShapeCast2D" parent="HitBoxes"]
[node name="WallCheck" type="ShapeCast2D" parent="HitBoxes" unique_id=1346807795]
visible = false
position = Vector2(0, -18)
shape = SubResource("RectangleShape2D_brh81")
target_position = Vector2(0, 3)
[node name="HurtBox" type="Area2D" parent="HitBoxes"]
[node name="HurtBox" type="Area2D" parent="HitBoxes" unique_id=552489258]
collision_layer = 2
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxes/HurtBox"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxes/HurtBox" unique_id=1057503068]
position = Vector2(0, -15)
shape = SubResource("CapsuleShape2D_n270p")
debug_color = Color(0.997466, 0, 0.165329, 0.42)
[node name="CollisionShapeMove" type="AnimationPlayer" parent="HitBoxes"]
[node name="CollisionShapeMove" type="AnimationPlayer" parent="HitBoxes" unique_id=903815220]
root_node = NodePath("../..")
libraries = {
&"": SubResource("AnimationLibrary_ib3u0")
}
libraries/ = SubResource("AnimationLibrary_ib3u0")
[node name="Markers" type="Node2D" parent="."]
[node name="Markers" type="Node2D" parent="." unique_id=43094193]
[node name="Center" type="Marker2D" parent="Markers"]
[node name="Center" type="Marker2D" parent="Markers" unique_id=1014479282]
position = Vector2(0, -40)
[node name="CameraCenter" type="Marker2D" parent="Markers"]
[node name="CameraCenter" type="Marker2D" parent="Markers" unique_id=214014744]
position = Vector2(0, -44)
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("initialNodeState")]
[node name="StateMachine" type="Node" parent="." unique_id=1522439522 node_paths=PackedStringArray("initialNodeState")]
script = ExtResource("12_n270p")
initialNodeState = NodePath("Idle")
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
[node name="Idle" type="Node" parent="StateMachine" unique_id=1554110740 node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("13_3ep63")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="Run" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
[node name="Run" type="Node" parent="StateMachine" unique_id=650516812 node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("15_rqcxa")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="Jump" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "fallState")]
[node name="Jump" type="Node" parent="StateMachine" unique_id=602373429 node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "fallState")]
script = ExtResource("14_kjljb")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
@@ -1093,7 +1091,7 @@ 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", "jumpState")]
[node name="Fall" type="Node" parent="StateMachine" unique_id=1177919389 node_paths=PackedStringArray("player", "animatedSprite2D", "wallCheck", "floorCheck", "ledgeGrabBox", "jumpState")]
script = ExtResource("14_3ep63")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
@@ -1103,12 +1101,12 @@ ledgeGrabBox = NodePath("../../LedgeGrab")
jumpState = NodePath("../Jump")
coyoteTime = 0.3
[node name="Land" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
[node name="Land" type="Node" parent="StateMachine" unique_id=774044394 node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("24_bp242")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="Grab" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "ledgeGrabBox", "wallCheck", "floorCheck")]
[node name="Grab" type="Node" parent="StateMachine" unique_id=794082049 node_paths=PackedStringArray("player", "animatedSprite2D", "ledgeGrabBox", "wallCheck", "floorCheck")]
script = ExtResource("23_kjljb")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
@@ -1116,33 +1114,31 @@ ledgeGrabBox = NodePath("../../LedgeGrab")
wallCheck = NodePath("../../HitBoxes/WallCheck")
floorCheck = NodePath("../../HitBoxes/FloorCheck")
[node name="CrouchIdle" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
[node name="CrouchIdle" type="Node" parent="StateMachine" unique_id=1979241886 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
script = ExtResource("24_brh81")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
[node name="CrouchWalk" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
[node name="CrouchWalk" type="Node" parent="StateMachine" unique_id=323925100 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
script = ExtResource("28_y6drd")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
[node name="Slide" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
[node name="Slide" type="Node" parent="StateMachine" unique_id=1722895560 node_paths=PackedStringArray("player", "animatedSprite2D", "collisionShapeMove")]
script = ExtResource("26_bp242")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
collisionShapeMove = NodePath("../../HitBoxes/CollisionShapeMove")
[node name="Dash" type="Node" parent="StateMachine" node_paths=PackedStringArray("player", "animatedSprite2D")]
[node name="Dash" type="Node" parent="StateMachine" unique_id=492363148 node_paths=PackedStringArray("player", "animatedSprite2D")]
script = ExtResource("25_01ng6")
player = NodePath("../..")
animatedSprite2D = NodePath("../../AnimatedSprite2D")
[node name="HitAnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_usp30")
}
[node name="HitAnimationPlayer" type="AnimationPlayer" parent="." unique_id=909073120]
libraries/ = SubResource("AnimationLibrary_usp30")
[connection signal="area_entered" from="HitBoxes/HurtBox" to="." method="_on_hurt_box_area_entered"]
[connection signal="body_entered" from="HitBoxes/HurtBox" to="." method="_on_hurt_box_body_entered"]

View File

@@ -1,4 +1,4 @@
[gd_resource type="VisualShader" load_steps=5 format=3 uid="uid://cqjsw6d71kkd2"]
[gd_resource type="VisualShader" format=3 uid="uid://cqjsw6d71kkd2"]
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_wwqby"]
parameter_name = "hit_color"
@@ -16,51 +16,6 @@ default_input_values = [0, 0.0, 1, 1.0, 2, 1e-05, 3, Vector3(0, 0, 0), 4, Vector
input_name = "color"
[resource]
code = "shader_type canvas_item;
render_mode blend_mix;
uniform bool enabled = false;
uniform vec4 hit_color : source_color = vec4(0.886654, 0.000000, 0.166007, 1.000000);
void fragment() {
// BooleanParameter:3
bool n_out3p0 = enabled;
// ColorParameter:2
vec4 n_out2p0 = hit_color;
// Input:5
vec4 n_out5p0 = COLOR;
vec3 n_out4p0;
// If:4
float n_in4p1 = 1.00000;
float n_in4p2 = 0.00001;
if(abs((n_out3p0 ? 1.0 : 0.0) - n_in4p1) < n_in4p2)
{
n_out4p0 = vec3(n_out2p0.xyz);
}
else if((n_out3p0 ? 1.0 : 0.0) < n_in4p1)
{
n_out4p0 = vec3(n_out5p0.xyz);
}
else
{
n_out4p0 = vec3(n_out5p0.xyz);
}
// Output:0
COLOR.rgb = n_out4p0;
}
"
mode = 1
flags/light_only = false
nodes/fragment/0/position = Vector2(320, 120)