gdfxr/example/Example.tscn

75 lines
2.2 KiB
Plaintext

[gd_scene load_steps=3 format=2]
[ext_resource path="res://example/Example.gd" type="Script" id=1]
[ext_resource path="res://example/example.sfxr" type="AudioStream" id=2]
[node name="Example" type="GridContainer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
custom_constants/hseparation = 32
custom_constants/vseparation = 32
columns = 2
script = ExtResource( 1 )
[node name="AudioPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 2 )
[node name="AdhocAudioPlayer" type="AudioStreamPlayer" parent="."]
[node name="Play" type="Button" parent="."]
margin_right = 141.0
margin_bottom = 32.0
rect_min_size = Vector2( 128, 32 )
size_flags_vertical = 4
text = "Play"
[node name="Label" type="Label" parent="."]
margin_left = 173.0
margin_right = 473.0
margin_bottom = 31.0
rect_min_size = Vector2( 300, 0 )
text = "A .sfxr file can be used as regular audio files like .wav, .ogg, and .mp3."
autowrap = true
[node name="PlayFile" type="Button" parent="."]
margin_top = 64.0
margin_right = 141.0
margin_bottom = 96.0
rect_min_size = Vector2( 128, 32 )
size_flags_vertical = 4
text = "Load .sfxr File"
[node name="Label2" type="Label" parent="."]
margin_left = 173.0
margin_top = 64.0
margin_right = 473.0
margin_bottom = 95.0
rect_min_size = Vector2( 300, 0 )
text = "A .sfxr file is a AudioStreamSample resource that can be loaded with load() or preload()."
autowrap = true
[node name="Generate" type="Button" parent="."]
margin_top = 144.0
margin_right = 141.0
margin_bottom = 176.0
rect_min_size = Vector2( 128, 32 )
size_flags_vertical = 4
text = "Runtime Generation"
[node name="Label3" type="Label" parent="."]
margin_left = 173.0
margin_top = 128.0
margin_right = 473.0
margin_bottom = 193.0
rect_min_size = Vector2( 300, 0 )
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 = true
[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"]