Files
Super-Mario-Bros.-Remastere…/Scenes/Prefabs/Entities/Objects/CannonBall.tscn
John Cooper McDonald ae4317f9e5 Fix lingering Hammer issues (#607)
* Fix lingering Hammer issues

* CannonBall gib

* Spike Block and Rocky Wrench cleanup

* Update SpikeBlock.tscn

* Update PlayerDetection.gd
2025-10-16 18:02:29 +01:00

59 lines
3.0 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://bumvqjhs2xxka"]
[ext_resource type="Script" uid="uid://bfdtqldkrv4dn" path="res://Scripts/Classes/Entities/Enemies/CannonBall.gd" id="1_yim3j"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="2_yim3j"]
[ext_resource type="JSON" path="res://Assets/Sprites/Enemies/CannonBall.json" id="3_874xq"]
[ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="3_pydrn"]
[ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="4_yim3j"]
[ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="5_il73j"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yim3j"]
size = Vector2(8, 8)
[node name="CannonBall" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder")]
z_index = -1
script = ExtResource("1_yim3j")
on_screen_enabler = NodePath("VisibleOnScreenEnabler2D")
score_note_adder = NodePath("ScoreNoteSpawner")
metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
[node name="Sprite" type="Sprite2D" parent="."]
[node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("2_yim3j")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("3_874xq")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="Hitbox" type="Area2D" parent="."]
[node name="Shape" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource("RectangleShape2D_yim3j")
[node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
script = ExtResource("3_pydrn")
hitbox = NodePath("../Hitbox")
height = 0
metadata/_custom_type_script = "uid://chj8hu207lrh"
[node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
script = ExtResource("4_yim3j")
visuals = NodePath("../Sprite")
metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
[node name="ScoreNoteSpawner" type="Node" parent="."]
script = ExtResource("5_il73j")
metadata/_custom_type_script = "uid://5octqlf4ohel"
[connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="." method="die_from_hammer"]
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
[connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
[connection signal="player_stomped_on" from="EnemyPlayerDetection" to="GibSpawner" method="stomp_die"]
[connection signal="gib_about_to_spawn" from="GibSpawner" to="Sprite" method="set_flip_v" binds= [true]]
[connection signal="screen_exited" from="VisibleOnScreenEnabler2D" to="." method="queue_free"]