Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,256 --> 00:00:03,328
Alright it's time to get started on UI audio
2
00:00:03,584 --> 00:00:06,912
And we are once again going to use the Fabulous
3
00:00:07,168 --> 00:00:07,680
Kenny
4
00:00:07,936 --> 00:00:09,728
4-hour audio effects
5
00:00:09,984 --> 00:00:12,288
So I'm downloading the UI audio
6
00:00:12,544 --> 00:00:13,568
Asset pack
7
00:00:13,824 --> 00:00:15,616
From kenney.nl
8
00:00:15,872 --> 00:00:16,896
I've also attack
9
00:00:17,152 --> 00:00:20,736
Zip file containing all of these sounds as a resource to this lesson
10
00:00:21,248 --> 00:00:23,808
So go ahead and download that from wherever you see
11
00:00:24,320 --> 00:00:26,112
How much you got the downloaded extract
12
00:00:26,368 --> 00:00:28,160
Go ahead and open up that folder
13
00:00:28,416 --> 00:00:31,232
And open up the audio folder in there
14
00:00:31,488 --> 00:00:33,792
Now what were you looking for it we looking for a sound
15
00:00:34,048 --> 00:00:34,816
Decking
16
00:00:35,072 --> 00:00:37,120
The hour button click sound
17
00:00:37,376 --> 00:00:38,912
And we got a lot of switches in here
18
00:00:39,424 --> 00:00:40,192
We got a lot of
19
00:00:40,704 --> 00:00:44,544
I think we'll just go ahead and stick with the clicks here but feel free to use
20
00:00:44,800 --> 00:00:46,848
Any other set of sounds that you prefer
21
00:00:47,104 --> 00:00:51,968
I'm going to use the Calypso in a going to drag those on over to the file system
22
00:00:52,224 --> 00:00:56,832
And then I will select all those and put those in the assets audio directory
23
00:00:58,112 --> 00:00:58,624
Like so
24
00:00:58,880 --> 00:01:00,141
So it got a clicks
25
00:01:00,143 --> 00:01:02,491
Subtitled by
online-courses.club
We compress knowledge for you!
26
00:01:02,492 --> 00:01:01,696
Now here's a Prayer
27
00:01:01,952 --> 00:01:06,048
Where to play the click whenever a button is pressed and where we have buttons well
28
00:01:06,304 --> 00:01:07,840
For now we have buttons
29
00:01:08,096 --> 00:01:08,864
In our
30
00:01:09,120 --> 00:01:09,888
End screen
31
00:01:10,144 --> 00:01:11,424
Right we've got these two
32
00:01:11,936 --> 00:01:13,984
But we've also got our upgrade card
33
00:01:14,240 --> 00:01:16,544
Which we might use a a different sound for
34
00:01:17,056 --> 00:01:18,592
But in the future we're gonna have
35
00:01:18,848 --> 00:01:19,616
Other
36
00:01:19,872 --> 00:01:24,992
Buttons for like our main menu in our options menu which are going to be building later
37
00:01:25,248 --> 00:01:25,760
So
38
00:01:26,016 --> 00:01:29,088
We need a button that will play a sound when we
39
00:01:29,600 --> 00:01:32,672
And if we're just using the stand-alone button nose
40
00:01:32,928 --> 00:01:34,976
We're going to have to write code for that
41
00:01:35,232 --> 00:01:35,744
Single time
42
00:01:36,256 --> 00:01:39,072
So what I'm going to do as I'm going to create a new scene
43
00:01:39,328 --> 00:01:42,912
And the new scene is going to have a root type of other node
44
00:01:43,168 --> 00:01:43,680
But
45
00:01:45,472 --> 00:01:48,544
And said that as the root and then I'm going to call this sound
46
00:01:51,104 --> 00:01:53,152
I'm gonna go ahead and see that inseam
47
00:01:53,408 --> 00:01:53,920
You have
48
00:01:54,688 --> 00:01:55,456
Sound button
49
00:01:56,736 --> 00:02:02,880
So using a button as a route which means that it will have all of the same properties and signals as a normal
50
00:02:03,392 --> 00:02:05,440
What we can do as we can add
51
00:02:05,952 --> 00:02:07,744
Random stream player to it
52
00:02:08,000 --> 00:02:10,048
And I want to play a sound on
53
00:02:10,304 --> 00:02:13,632
We can I use the random stream player to die
54
00:02:16,960 --> 00:02:17,728
Like so
55
00:02:17,984 --> 00:02:23,616
Because again this is going to be sort of separated from the world doesn't make sense
56
00:02:23,872 --> 00:02:28,480
To use a 2D button for a UI element that is always going to be in the same spot
57
00:02:28,736 --> 00:02:29,504
On screen
58
00:02:29,760 --> 00:02:33,856
So what we're going to do actually is going to create a new scene
59
00:02:34,112 --> 00:02:35,392
Of type other now
60
00:02:35,904 --> 00:02:38,464
And make it a type of audio stream player
61
00:02:38,720 --> 00:02:40,000
And just call this
62
00:02:40,512 --> 00:02:41,280
Random
63
00:02:41,536 --> 00:02:42,816
Audio stream player
64
00:02:43,072 --> 00:02:44,608
And you can get rid of the audio
65
00:02:44,864 --> 00:02:46,400
If you prefer to match the other
66
00:02:46,656 --> 00:02:49,472
Name of a random stream player to die
67
00:02:49,728 --> 00:02:52,032
And I'm going to add a component at the end
68
00:02:52,800 --> 00:02:54,336
Random stream
69
00:02:54,592 --> 00:02:57,920
Component and then we'll save that in our scenes
70
00:02:58,176 --> 00:02:58,944
Component Direct
71
00:03:00,224 --> 00:03:01,248
The nice thing about
72
00:03:01,760 --> 00:03:03,296
Is that I'm just going to go
73
00:03:03,552 --> 00:03:06,112
Open up my random stream player to decompose
74
00:03:06,624 --> 00:03:09,952
And I'm going to open up the script and
75
00:03:10,208 --> 00:03:12,000
Highlight everything with ctrl a
76
00:03:12,512 --> 00:03:14,048
And press ctrl c to copy
77
00:03:14,304 --> 00:03:16,096
I'm going to bring that back over 2
78
00:03:16,352 --> 00:03:18,656
Are random stream player component
79
00:03:18,912 --> 00:03:20,192
Add a new script create
80
00:03:21,472 --> 00:03:21,984
And
81
00:03:22,240 --> 00:03:23,264
Hit ctrl h
82
00:03:23,520 --> 00:03:24,544
Highlight everything in here
83
00:03:24,800 --> 00:03:26,080
And paste that code
84
00:03:26,336 --> 00:03:29,920
And the only thing we need to change is extends right
85
00:03:31,200 --> 00:03:31,968
Extends
86
00:03:32,224 --> 00:03:34,016
Needs to extend audio stream player
87
00:03:35,296 --> 00:03:36,320
Ok and
88
00:03:36,576 --> 00:03:38,368
Then we can select a root node
89
00:03:38,624 --> 00:03:40,160
A random stream player component
90
00:03:40,416 --> 00:03:42,976
And let's set the bus to SFX down here
91
00:03:43,232 --> 00:03:44,512
So that every time we use
92
00:03:44,768 --> 00:03:45,280
GSF
93
00:03:46,560 --> 00:03:48,608
It is unfortunate that we have to
94
00:03:48,864 --> 00:03:50,144
Copy and paste this code
95
00:03:50,400 --> 00:03:54,496
The audio stream player 2D inherit from node to the
96
00:03:54,752 --> 00:03:56,800
And the audio stream player in here it's from
97
00:03:57,056 --> 00:03:57,568
Note
98
00:03:57,824 --> 00:04:00,896
And so because there was inherit from different branches
99
00:04:01,152 --> 00:04:03,968
It becomes really hard to you reuse the code
100
00:04:04,224 --> 00:04:06,784
Because they don't have a base type
101
00:04:07,040 --> 00:04:08,832
In common except for
102
00:04:09,088 --> 00:04:12,672
Note so you could write extends node if you wanted to
103
00:04:12,928 --> 00:04:14,976
But then you lose all of the
104
00:04:15,488 --> 00:04:19,327
Properties that you can set here and there's a work around for that as well
105
00:04:19,583 --> 00:04:22,143
It's just easier in this instance
106
00:04:22,399 --> 00:04:23,167
Not ideal
107
00:04:23,423 --> 00:04:25,983
But it's easier to just copy and paste the code
108
00:04:26,239 --> 00:04:26,751
And
109
00:04:27,007 --> 00:04:28,031
Make them set
110
00:04:28,287 --> 00:04:29,567
Scripts instead of trying to share
111
00:04:30,079 --> 00:04:32,127
It's got a random stream player company
112
00:04:32,383 --> 00:04:33,919
Let's go back to a sound
113
00:04:34,175 --> 00:04:35,711
Here and let's go ahead
114
00:04:35,967 --> 00:04:38,527
And instantiated a child seen underneath
115
00:04:38,783 --> 00:04:40,575
And make that a random
116
00:04:40,831 --> 00:04:41,855
Stream player component
117
00:04:42,367 --> 00:04:42,879
Like so
118
00:04:43,391 --> 00:04:46,207
And then I'm going to add a script to our sound button here
119
00:04:47,231 --> 00:04:47,999
I'm going to
120
00:04:48,255 --> 00:04:48,767
Create
121
00:04:49,279 --> 00:04:51,839
And all we need to do is on already
122
00:04:52,351 --> 00:04:55,679
We just need to connect to the press signal so we can save
123
00:04:56,191 --> 00:04:56,703
Dart
124
00:04:56,959 --> 00:04:57,471
Connect
125
00:04:58,751 --> 00:04:59,263
Press
126
00:05:01,055 --> 00:05:02,335
Song on Prayer
127
00:05:03,359 --> 00:05:07,455
And we are going to reference the random stream player component
128
00:05:07,711 --> 00:05:09,759
Play underscore random
129
00:05:10,015 --> 00:05:13,599
It's really that simple r button has a press
130
00:05:14,623 --> 00:05:16,415
Which will inmates when the button is clicked
131
00:05:16,671 --> 00:05:20,511
And if you're unsure again you can look at the new tab here to look at all the signal
132
00:05:20,767 --> 00:05:22,047
That are available to you
133
00:05:22,303 --> 00:05:24,095
And now we just need a drop in
134
00:05:24,351 --> 00:05:26,143
Our sounds into the stream sorry
135
00:05:26,655 --> 00:05:28,447
So highlight all the click sounds
136
00:05:28,703 --> 00:05:29,727
Shift and click
137
00:05:29,983 --> 00:05:31,519
And and Dragons on over
138
00:05:31,775 --> 00:05:32,799
Under the streams are a
139
00:05:33,055 --> 00:05:34,591
And there's always room
140
00:05:34,847 --> 00:05:37,663
Dunno what I'm going to do is I'm going to switch to the 2D mode here
141
00:05:37,919 --> 00:05:38,943
And I'm just going to write
142
00:05:39,455 --> 00:05:39,967
Sometime
143
00:05:40,223 --> 00:05:42,527
In my sound button here so I'm going to click the sound button
144
00:05:42,783 --> 00:05:43,807
And the text is going to
145
00:05:44,063 --> 00:05:44,575
Sound
146
00:05:44,831 --> 00:05:45,343
Button
147
00:05:46,367 --> 00:05:50,207
And then if I run the scene with this run current seen button
148
00:05:51,487 --> 00:05:52,255
You can see that
149
00:05:52,511 --> 00:05:56,095
That is playing a sound now a random sound every time I click
150
00:05:57,631 --> 00:05:58,143
So that's
151
00:05:58,655 --> 00:06:00,703
Let's go to our end screen
152
00:06:04,287 --> 00:06:06,335
And in here we need to replace
153
00:06:06,591 --> 00:06:08,127
These buttons with
154
00:06:08,383 --> 00:06:09,407
That sound button
155
00:06:09,663 --> 00:06:10,687
So what we need to do
156
00:06:10,943 --> 00:06:11,711
2
157
00:06:11,967 --> 00:06:16,575
Change LPS buttons ears will just have to do it manually solus institute of child theme
158
00:06:16,831 --> 00:06:17,599
Let's do
159
00:06:17,855 --> 00:06:18,623
Sound but
160
00:06:19,647 --> 00:06:22,975
Let's duplicate that you can hit ctrl-d to duplicate and
161
00:06:23,487 --> 00:06:24,767
Snow got to sound button
162
00:06:25,791 --> 00:06:27,583
Call days restart button
163
00:06:28,351 --> 00:06:29,631
And quit button old
164
00:06:30,655 --> 00:06:31,935
And then what you can do with
165
00:06:32,191 --> 00:06:33,471
Select the reset button
166
00:06:33,727 --> 00:06:37,311
And then any inspector select this measured object property
167
00:06:37,823 --> 00:06:38,591
Tool button here
168
00:06:39,103 --> 00:06:40,127
Slide copier
169
00:06:40,639 --> 00:06:42,431
Then select your first sound button
170
00:06:42,687 --> 00:06:44,735
Click that button again that Tobin
171
00:06:44,991 --> 00:06:46,271
And in peace the properties
172
00:06:46,527 --> 00:06:48,831
And that will transfer all the same properties from
173
00:06:49,087 --> 00:06:51,391
Original restart button to a new restart button
174
00:06:51,903 --> 00:06:53,695
And then do the same for the quit
175
00:06:53,951 --> 00:06:55,231
So I'm going to sleep the quick
176
00:06:55,487 --> 00:06:56,511
Click the tool button
177
00:06:56,767 --> 00:06:57,535
Can't be proper
178
00:06:58,047 --> 00:06:59,839
I like the sound button to
179
00:07:00,095 --> 00:07:01,375
Click that button again
180
00:07:01,631 --> 00:07:02,911
And Pace the properties there
181
00:07:03,167 --> 00:07:04,703
Then we can rename this to
182
00:07:04,959 --> 00:07:05,983
Restart button
183
00:07:07,263 --> 00:07:07,775
Quit button
184
00:07:10,335 --> 00:07:12,383
And we can highlight bosleys with control
185
00:07:13,151 --> 00:07:13,663
Right
186
00:07:13,919 --> 00:07:15,199
Access as unique
187
00:07:15,711 --> 00:07:17,503
And then we can delete our all the time
188
00:07:17,759 --> 00:07:20,063
By hitting delete after selecting them
189
00:07:20,319 --> 00:07:20,831
And then
190
00:07:21,343 --> 00:07:23,903
Ok so now we run that seem
191
00:07:24,671 --> 00:07:25,439
You are here
192
00:07:26,719 --> 00:07:27,231
When you
193
00:07:27,743 --> 00:07:28,255
The button
194
00:07:28,511 --> 00:07:29,791
Now the problem is dead
195
00:07:30,047 --> 00:07:31,071
You may not hear it
196
00:07:31,327 --> 00:07:33,631
Because work instantly changing
197
00:07:33,887 --> 00:07:35,423
The scene or quitting the game
198
00:07:35,935 --> 00:07:37,471
And we will address that
199
00:07:37,727 --> 00:07:38,239
Later
200
00:07:38,495 --> 00:07:40,287
But rest assured that
201
00:07:40,543 --> 00:07:42,847
Your buttons are working and we tested and
202
00:07:43,103 --> 00:07:44,639
In the sound button here
203
00:07:44,895 --> 00:07:45,407
Ok
204
00:07:45,663 --> 00:07:50,015
The next step is to come up with some sounds for our upgrade cards
13476
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.