42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
[gd_scene load_steps=5 format=3 uid="uid://c4dkrtswpv8cv"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://ciidukjv5k6oa" path="res://assets/textures/debug/banana.png" id="1_7651j"]
|
|
[ext_resource type="AudioStream" uid="uid://s64cl4x57oae" path="res://assets/audios/sound_explode.wav" id="3_dnu2u"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_krkfl"]
|
|
resource_name = "sound_debug_tile"
|
|
script/source = "extends StaticBody2D
|
|
|
|
@export var soundOn = true
|
|
|
|
func _ready():
|
|
$audio_stream_player_2d.autoplay = soundOn
|
|
if(soundOn):
|
|
$audio_stream_player_2d.play()
|
|
func OnAudioFinished():
|
|
if(soundOn):
|
|
$audio_stream_player_2d.play()
|
|
"
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2d5dy"]
|
|
radius = 30.8058
|
|
|
|
[node name="sound_debug_tile" type="StaticBody2D"]
|
|
collision_priority = 20.0
|
|
script = SubResource("GDScript_krkfl")
|
|
soundOn = false
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
texture = ExtResource("1_7651j")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(-1, 4)
|
|
shape = SubResource("CircleShape2D_2d5dy")
|
|
|
|
[node name="audio_stream_player_2d" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("3_dnu2u")
|
|
max_distance = 1700.0
|
|
attenuation = 1.7
|
|
|
|
[connection signal="finished" from="audio_stream_player_2d" to="." method="OnAudioFinished"]
|