Update hitboxes for consistency (#608)

Co-authored-by: Joe H <97353363+JHDev2006@users.noreply.github.com>
This commit is contained in:
John Cooper McDonald
2025-10-17 11:12:57 -05:00
committed by GitHub
parent ed297891fd
commit 9a17f140e0
27 changed files with 246 additions and 209 deletions

View File

@@ -1,22 +1,21 @@
[gd_scene load_steps=10 format=3 uid="uid://dn2rawqxpuywe"]
[gd_scene load_steps=9 format=3 uid="uid://dn2rawqxpuywe"]
[ext_resource type="Script" uid="uid://bb01xttxcem1c" path="res://Scripts/Classes/Entities/Items/Hachisuke.gd" id="1_d7uck"]
[ext_resource type="Texture2D" uid="uid://bbdcmhyxmc3pu" path="res://Assets/Sprites/Items/SPItems.png" id="2_wdqsg"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_3unjp"]
[ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="3_eh4yc"]
[ext_resource type="Script" uid="uid://cnheej0sxmoxg" path="res://Scripts/Parts/PlayerDetection.gd" id="4_3unjp"]
[ext_resource type="JSON" path="res://Assets/Sprites/Items/Hachisuke.json" id="4_db2kr"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qj4fn"]
atlas = ExtResource("2_wdqsg")
region = Rect2(0, 0, 16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kn7db"]
size = Vector2(12, 12)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_6c253"]
size = Vector2(16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8f4k7"]
size = Vector2(12, 12)
[node name="Hachisuke" type="CharacterBody2D"]
collision_layer = 8
collision_mask = 6
@@ -40,18 +39,14 @@ script = ExtResource("3_eh4yc")
add_score = true
metadata/_custom_type_script = "uid://5octqlf4ohel"
[node name="PlayerDetection" type="Area2D" parent="."]
position = Vector2(0, -8)
script = ExtResource("4_3unjp")
metadata/_custom_type_script = "uid://cnheej0sxmoxg"
[node name="Shape" type="CollisionShape2D" parent="PlayerDetection"]
shape = SubResource("RectangleShape2D_kn7db")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -8)
shape = SubResource("RectangleShape2D_6c253")
[connection signal="player_entered" from="PlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [8000]]
[connection signal="player_entered" from="PlayerDetection" to="." method="play_sfx" unbinds=1]
[connection signal="player_entered" from="PlayerDetection" to="." method="queue_free" unbinds=1]
[node name="Hitbox" type="Area2D" parent="."]
position = Vector2(0, -8)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource("RectangleShape2D_8f4k7")
[connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]