Skip to content

Commit 71c4543

Browse files
author
r0zbot
committed
Loop (98%)perfeito da trilha sonora
1 parent f98504c commit 71c4543

File tree

7 files changed

+35
-3
lines changed

7 files changed

+35
-3
lines changed

godot/Daft Punk - Derezzed.ogg

-3.21 MB
Binary file not shown.

godot/SoundtrackRepeat.gd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
extends StreamPlayer
2+
3+
# class member variables go here, for example:
4+
# var a = 2
5+
# var b = "textvar"
6+
7+
func _ready():
8+
# Called every time the node is added to the scene.
9+
# Initialization here
10+
11+
pass
12+
13+
14+
func _on_Intro_finished():
15+
self.set_paused(false)
16+
pass # replace with function body

godot/main.tscn

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_scene load_steps=6 format=1]
1+
[gd_scene load_steps=8 format=1]
22

33
[ext_resource path="res://ball.tscn" type="PackedScene" id=1]
44
[ext_resource path="res://barraAzul.tscn" type="PackedScene" id=2]
55
[ext_resource path="res://barraVermelha.tscn" type="PackedScene" id=3]
6-
[ext_resource path="res://Daft Punk - Derezzed.ogg" type="AudioStream" id=4]
6+
[ext_resource path="res://soundtrack_repeat.ogg" type="AudioStream" id=4]
7+
[ext_resource path="res://SoundtrackRepeat.gd" type="Script" id=5]
8+
[ext_resource path="res://soundtrack_intro.ogg" type="AudioStream" id=6]
79

810
[sub_resource type="RectangleShape2D" id=1]
911

@@ -59,15 +61,29 @@ shape = SubResource( 1 )
5961
trigger = false
6062
_update_shape_index = 1
6163

62-
[node name="StreamPlayer" type="StreamPlayer" parent="."]
64+
[node name="Repeat" type="StreamPlayer" parent="."]
6365

6466
stream/stream = ExtResource( 4 )
6567
stream/play = false
6668
stream/loop = true
6769
stream/volume_db = 0.0
6870
stream/autoplay = true
71+
stream/paused = true
72+
stream/loop_restart_time = 0.0
73+
stream/buffering_ms = 500
74+
script/script = ExtResource( 5 )
75+
76+
[node name="Intro" type="StreamPlayer" parent="."]
77+
78+
stream/stream = ExtResource( 6 )
79+
stream/play = false
80+
stream/loop = false
81+
stream/volume_db = 0.0
82+
stream/autoplay = true
6983
stream/paused = false
7084
stream/loop_restart_time = 0.0
7185
stream/buffering_ms = 500
7286

87+
[connection signal="finished" from="Intro" to="Repeat" method="_on_Intro_finished"]
88+
7389

godot/soundtrack_intro.ogg

1000 KB
Binary file not shown.

godot/soundtrack_repeat.ogg

5.8 MB
Binary file not shown.

soundtrack.veg

16.6 KB
Binary file not shown.

soundtrack.veg.bak

16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)