gdfxr/example/Example.tscn

60 lines
1.9 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=3 format=3 uid="uid://bv31mn2hs6wom"]
2022-02-22 13:54:25 +01:00
[ext_resource type="Script" path="res://example/Example.gd" id="1"]
[ext_resource type="AudioStream" uid="uid://byf7u7a25fuf4" path="res://example/example.sfxr" id="2"]
2022-02-22 13:54:25 +01:00
[node name="Example" type="GridContainer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
2022-10-16 05:33:38 +02:00
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/h_separation = 32
theme_override_constants/v_separation = 32
columns = 2
script = ExtResource("1")
2022-02-22 13:54:25 +01:00
[node name="AudioPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2")
[node name="AdhocAudioPlayer" type="AudioStreamPlayer" parent="."]
[node name="Play" type="Button" parent="."]
2022-10-16 05:33:38 +02:00
layout_mode = 2
size_flags_vertical = 4
2022-02-22 13:54:25 +01:00
text = "Play"
[node name="Label" type="Label" parent="."]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2
text = "A .sfxr file can be used as regular audio files like .wav, .ogg, and .mp3."
autowrap_mode = 3
[node name="PlayFile" type="Button" parent="."]
layout_mode = 2
size_flags_vertical = 4
text = "Load .sfxr File"
[node name="Label2" type="Label" parent="."]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2
text = "A .sfxr file is a AudioStreamSample resource that can be loaded with load() or preload()."
autowrap_mode = 3
[node name="Generate" type="Button" parent="."]
layout_mode = 2
size_flags_vertical = 4
text = "Runtime Generation"
[node name="Label3" type="Label" parent="."]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2
text = "You can generate the sound effect at runtime. However, due to performance constraints with GDScript, your game might freeze when generating long sounds."
autowrap_mode = 3
2022-02-22 13:54:25 +01:00
[connection signal="pressed" from="Play" to="." method="_on_Play_pressed"]
[connection signal="pressed" from="PlayFile" to="." method="_on_PlayFile_pressed"]
[connection signal="pressed" from="Generate" to="." method="_on_Generate_pressed"]