Shootable switches react to shots

This commit is contained in:
MaddoScientisto 2026-02-28 19:24:34 +01:00
commit 35275f9048
5 changed files with 523 additions and 390 deletions

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://c8vlgg70s5u3p"]
[gd_scene format=3 uid="uid://c8vlgg70s5u3p"]
[ext_resource type="Script" uid="uid://qxh76ahgexqa" path="res://Scripts/Interactables/Switch3D.cs" id="1_uhypp"]
[ext_resource type="Script" uid="uid://dlfhqyy3ya8d4" path="res://Scripts/Interactables/ShootableSwitch3D.cs" id="1_uhypp"]
[ext_resource type="Texture2D" uid="uid://d24g1qb40t72l" path="res://Sprites/Button_Small.png" id="2_uok2k"]
[ext_resource type="AudioStream" uid="uid://bjvklk7qmlivd" path="res://SFX/288963__littlerobotsoundfactory__click_electronic_14.wav" id="3_pmslt"]
[ext_resource type="AudioStream" uid="uid://myr6n2c1u503" path="res://SFX/581602__samsterbirdies__beep-error.mp3" id="4_4smss"]
@ -9,14 +9,14 @@
[sub_resource type="SphereShape3D" id="SphereShape3D_itd0i"]
radius = 0.868968
[node name="ControlPad" type="Area3D" node_paths=PackedStringArray("Targets") groups=["Interactable"]]
collision_layer = 32
collision_mask = 0
[node name="ControlPad" type="Area3D" unique_id=454991887 groups=["Interactable"]]
collision_layer = 0
collision_mask = 136
script = ExtResource("1_uhypp")
Targets = []
ReactsTo = 1
metadata/_edit_group_ = true
[node name="Sprite3D" type="Sprite3D" parent="."]
[node name="Sprite3D" type="Sprite3D" parent="." unique_id=1668220059]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 0, 0)
visible = false
pixel_size = 0.1
@ -24,17 +24,17 @@ texture_filter = 0
texture = ExtResource("2_uok2k")
hframes = 4
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1191207257]
shape = SubResource("SphereShape3D_itd0i")
[node name="ActivationSound" type="AudioStreamPlayer3D" parent="."]
[node name="ActivationSound" type="AudioStreamPlayer3D" parent="." unique_id=1198083209]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15351868)
stream = ExtResource("3_pmslt")
bus = &"Effects"
[node name="DenySound" type="AudioStreamPlayer3D" parent="."]
[node name="DenySound" type="AudioStreamPlayer3D" parent="." unique_id=924351038]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15351868)
stream = ExtResource("4_4smss")
bus = &"Effects"
[node name="blockbench_export2" parent="." instance=ExtResource("5_uhypp")]
[node name="blockbench_export2" parent="." unique_id=920256639 instance=ExtResource("5_uhypp")]