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:02,816
We have a little bit more foundational
2
00:00:03,072 --> 00:00:03,584
To do
3
00:00:03,840 --> 00:00:06,400
And then we're going to spend the rest of the course
4
00:00:06,656 --> 00:00:08,704
Creating content in polishing a game
5
00:00:08,960 --> 00:00:11,264
But they are loose ends we have the time
6
00:00:11,520 --> 00:00:16,128
And the reason that we are mostly just doing Foundation work for the first half of this course
7
00:00:16,640 --> 00:00:18,944
Is that that's actually some of the easiest
8
00:00:19,200 --> 00:00:20,736
Stuff that were going to do
9
00:00:20,992 --> 00:00:26,368
And soul it's useful to do that stuff first to get you all acclimated with how you build out
10
00:00:26,624 --> 00:00:28,160
Me systems in Godot
11
00:00:28,416 --> 00:00:29,440
And then we're going to get into
12
00:00:29,696 --> 00:00:30,720
Complicated things
13
00:00:30,976 --> 00:00:32,512
As we start polishing the game
14
00:00:32,768 --> 00:00:35,840
And creating new abilities in new anime types of things that need
15
00:00:36,352 --> 00:00:40,960
So what are the loose ends we need a tie up is that we don't have anyway
16
00:00:41,984 --> 00:00:42,752
Winning the game
17
00:00:43,008 --> 00:00:45,568
And right now we have the game set to stop
18
00:00:45,824 --> 00:00:47,360
Counting at 1
19
00:00:48,128 --> 00:00:50,176
And that's fine for Dubai purpose
20
00:00:50,432 --> 00:00:52,736
We just need something to show up
21
00:00:52,992 --> 00:00:54,272
Like a victory screen
22
00:00:55,296 --> 00:00:58,880
For the player to celebrate the victory and also to prom to the player
23
00:00:59,136 --> 00:01:01,165
To return to the main menu which we also don't have
24
00:01:01,167 --> 00:01:03,515
Subtitled by
online-courses.club
We compress knowledge for you!
25
00:01:03,516 --> 00:01:03,232
And things like that
26
00:01:03,744 --> 00:01:05,792
So let's go ahead and just build that
27
00:01:06,048 --> 00:01:10,144
And the first thing I do is work going to create a new scene with
28
00:01:10,400 --> 00:01:11,424
Route type
29
00:01:11,680 --> 00:01:12,448
Canvas layer
30
00:01:13,984 --> 00:01:17,312
Ok and let's go ahead and rename this canvas layer 2
31
00:01:17,824 --> 00:01:19,104
Victory screen
32
00:01:21,152 --> 00:01:21,664
Saved
33
00:01:21,920 --> 00:01:22,944
Into scenes
34
00:01:23,200 --> 00:01:23,968
UI
35
00:01:24,480 --> 00:01:25,504
Victory screen
36
00:01:26,784 --> 00:01:28,576
What are in margarine contain
37
00:01:28,832 --> 00:01:30,624
As a child of that node
38
00:01:30,880 --> 00:01:31,904
And then we're going to click this
39
00:01:32,160 --> 00:01:32,928
Anchor
40
00:01:33,184 --> 00:01:34,976
Reset offset button appear
41
00:01:35,232 --> 00:01:37,280
And then select the bottom right for
42
00:01:37,536 --> 00:01:38,048
Option
43
00:01:38,560 --> 00:01:39,328
Ok perfect
44
00:01:40,096 --> 00:01:44,192
And then we're going to do something very simple we're going to create a new panel container
45
00:01:45,216 --> 00:01:47,008
Underneath the margin Titania
46
00:01:48,032 --> 00:01:51,616
Let's create a new vbox container underneath that panel container
47
00:01:52,896 --> 00:01:54,176
What's go ahead in Adelaide
48
00:01:55,712 --> 00:01:57,248
And let's underneath
49
00:01:57,760 --> 00:01:58,784
In that labour
50
00:01:59,040 --> 00:01:59,552
Let's
51
00:01:59,808 --> 00:02:00,576
Type in the tour
52
00:02:00,832 --> 00:02:01,344
Victor
53
00:02:03,648 --> 00:02:09,024
And for the label what we're going to do is we are going to change the horizontal alignment to be Centre
54
00:02:09,280 --> 00:02:11,840
What's change the protocol I meant to be centre as
55
00:02:12,864 --> 00:02:13,888
What's scroll down
56
00:02:14,400 --> 00:02:16,704
Until we see the font size is absent
57
00:02:16,960 --> 00:02:20,288
Let's check the font size and change it to
58
00:02:20,544 --> 00:02:22,336
24 pixels so it's bigger
59
00:02:22,592 --> 00:02:24,896
And will be replacing this font later on
60
00:02:25,152 --> 00:02:26,688
Animals create another label
61
00:02:27,200 --> 00:02:28,480
Interview box container
62
00:02:29,760 --> 00:02:30,528
And this labour
63
00:02:30,784 --> 00:02:31,808
We're just going to say
64
00:02:32,576 --> 00:02:33,344
You won
65
00:02:33,600 --> 00:02:34,368
ASDA
66
00:02:34,880 --> 00:02:37,696
Alright let's create a button underneath a box container
67
00:02:38,976 --> 00:02:41,024
Was bright in the text Reece
68
00:02:41,280 --> 00:02:42,304
Is the first option
69
00:02:42,560 --> 00:02:45,120
What's control duplicate that button
70
00:02:45,376 --> 00:02:46,656
And write
71
00:02:48,960 --> 00:02:53,056
So this button let's rename this button no to restart button
72
00:02:54,080 --> 00:02:57,152
And let's rename the second button there to quit button
73
00:02:58,688 --> 00:03:04,832
Alright so this is looking pretty ugly and what we're going to do to fix that is very simple we're going to go to a panel container so
74
00:03:05,600 --> 00:03:09,440
Scroll down to the size settings and change these both to shrink
75
00:03:10,976 --> 00:03:12,512
And now it's looking a little bit
76
00:03:12,768 --> 00:03:15,584
What we can do to make this look even better than the
77
00:03:15,840 --> 00:03:18,656
Is let's create a margin container under the
78
00:03:18,912 --> 00:03:19,680
The panel container
79
00:03:20,960 --> 00:03:22,240
Let's drag it up
80
00:03:22,496 --> 00:03:23,520
So that it is
81
00:03:23,776 --> 00:03:25,056
Just below the panel contain
82
00:03:25,312 --> 00:03:29,920
And let's Drive the vbox container and drag it into the margin container
83
00:03:30,176 --> 00:03:31,200
To make it a child
84
00:03:31,456 --> 00:03:35,040
Salad select that margin container that's underneath the panel container
85
00:03:35,296 --> 00:03:37,088
Scroll down to
86
00:03:37,344 --> 00:03:37,856
The
87
00:03:38,112 --> 00:03:38,880
Constant
88
00:03:39,136 --> 00:03:42,720
Override here margin-left margin-top margin-right margin-bottom
89
00:03:42,976 --> 00:03:43,744
And Lettuce
90
00:03:44,000 --> 00:03:45,536
8 for all of those
91
00:03:45,792 --> 00:03:48,096
And you can use tab to go to the
92
00:03:48,608 --> 00:03:49,888
In futsal 8
93
00:03:50,144 --> 00:03:50,912
8
94
00:03:52,960 --> 00:03:58,080
Any other thing that we can do to make it look a little bit better is we can change the minimum size of this March
95
00:03:58,336 --> 00:04:00,896
Container so select that margin container again
96
00:04:01,152 --> 00:04:03,712
When scroll up to the cost of minimum size
97
00:04:03,968 --> 00:04:05,760
And let's set the
98
00:04:06,016 --> 00:04:06,784
To something like
99
00:04:07,040 --> 00:04:07,552
Volume 50
100
00:04:07,808 --> 00:04:09,088
Or let's do 180
101
00:04:10,624 --> 00:04:14,720
So we've got a more respectable looking victory screen
102
00:04:14,976 --> 00:04:20,095
Ok let's Mark the restart button as unique name by right clicking
103
00:04:20,351 --> 00:04:22,399
And cooking accessories unique name
104
00:04:22,655 --> 00:04:23,679
I'm going to do this
105
00:04:25,727 --> 00:04:26,239
Alright
106
00:04:26,495 --> 00:04:28,799
Let's add a script to the Victory
107
00:04:29,311 --> 00:04:31,103
And the default settings are ok
108
00:04:31,359 --> 00:04:32,895
Let's override
109
00:04:33,151 --> 00:04:33,919
The ready-made
110
00:04:35,199 --> 00:04:40,319
We're going to do the same thing that we did for the upgrade screen and that is were going to write get 3
111
00:04:40,831 --> 00:04:42,879
Dot paused is equal to true
112
00:04:44,671 --> 00:04:46,719
And then what we're going to do in
113
00:04:46,975 --> 00:04:51,839
The ready method as well as we're going to access the restart button by doing dollar sign
114
00:04:52,095 --> 00:04:52,863
Percent
115
00:04:53,375 --> 00:04:54,143
Restart button
116
00:04:55,679 --> 00:04:56,703
Gonna connect
117
00:04:57,215 --> 00:04:57,983
To the
118
00:04:58,239 --> 00:04:59,007
Pressed Sydney
119
00:04:59,263 --> 00:05:00,543
So pressed that connect
120
00:05:00,799 --> 00:05:02,079
And it'll be a middle
121
00:05:02,335 --> 00:05:03,871
When the reset button is pressed
122
00:05:04,127 --> 00:05:04,639
And again
123
00:05:04,895 --> 00:05:07,455
You can click the restart button in your scenery over here
124
00:05:07,967 --> 00:05:11,551
And then click the new tab and you can see that these are but
125
00:05:12,063 --> 00:05:12,575
Signals
126
00:05:12,831 --> 00:05:15,135
So we're going to connect to the Preston on restart
127
00:05:15,647 --> 00:05:17,439
Let's in that can
128
00:05:17,951 --> 00:05:19,231
Function call lists
129
00:05:19,487 --> 00:05:21,279
Do on restart
130
00:05:21,535 --> 00:05:22,047
Button
131
00:05:23,327 --> 00:05:24,863
What does a function that what have to define
132
00:05:25,375 --> 00:05:27,423
What I'm gonna do is going to copy this line
133
00:05:27,679 --> 00:05:28,703
And paste it below
134
00:05:28,959 --> 00:05:30,239
I changed the first
135
00:05:30,495 --> 00:05:31,007
No
136
00:05:31,263 --> 00:05:33,567
Here to quit button instead of restart button
137
00:05:33,823 --> 00:05:36,639
And then change the method name here to on
138
00:05:36,895 --> 00:05:37,407
Quick
139
00:05:38,175 --> 00:05:39,711
Buffalos method
140
00:05:39,967 --> 00:05:41,247
On restart
141
00:05:41,503 --> 00:05:42,015
But
142
00:05:42,783 --> 00:05:43,295
Press
143
00:05:44,319 --> 00:05:45,599
What's this right pass for now
144
00:05:45,855 --> 00:05:47,391
And then on quit
145
00:05:47,903 --> 00:05:48,415
Button
146
00:05:48,671 --> 00:05:49,183
Crest
147
00:05:49,951 --> 00:05:51,487
And same to you working right path
148
00:05:51,743 --> 00:05:55,327
Ok when we start is pressed we're going to do something very basic for now
149
00:05:55,583 --> 00:05:57,631
This is going to change in the future I'm sure
150
00:05:57,887 --> 00:05:59,679
But what we're going to do is we're going to do
151
00:05:59,935 --> 00:06:00,447
At 3
152
00:06:02,239 --> 00:06:02,751
Change
153
00:06:03,007 --> 00:06:04,031
Underscore
154
00:06:04,287 --> 00:06:04,799
Scene
155
00:06:05,055 --> 00:06:05,567
24
156
00:06:05,823 --> 00:06:09,407
And what is this going to do is this is going to load
157
00:06:09,663 --> 00:06:11,711
The file at the path we provide
158
00:06:12,223 --> 00:06:13,503
And change the
159
00:06:13,759 --> 00:06:14,527
Seemed tree
160
00:06:15,039 --> 00:06:15,551
2
161
00:06:16,575 --> 00:06:17,599
Seen as the
162
00:06:17,855 --> 00:06:19,647
So let me explain it in a better way
163
00:06:19,903 --> 00:06:21,695
If you got a project project settings
164
00:06:21,951 --> 00:06:24,767
Can we go to the run option under application
165
00:06:25,023 --> 00:06:27,071
You can see that the main seen here
166
00:06:27,327 --> 00:06:28,863
Rest seems mean
167
00:06:29,119 --> 00:06:30,399
Me and Dad tsyn
168
00:06:30,655 --> 00:06:31,167
Right
169
00:06:31,423 --> 00:06:37,567
What is going to do is this is essentially going to on boot up the game is going to add all of your
170
00:06:37,823 --> 00:06:39,615
Auto load nodes so we have one
171
00:06:39,871 --> 00:06:40,895
To the same tree
172
00:06:41,151 --> 00:06:42,687
And then it's going on load
173
00:06:42,943 --> 00:06:43,711
Instance
174
00:06:43,967 --> 00:06:48,831
This scene here and add that to the scene tree as well as your current
175
00:06:49,087 --> 00:06:49,599
Scene
176
00:06:49,855 --> 00:06:50,367
I know this
177
00:06:50,623 --> 00:06:53,439
Using the word seen over and over again is a little bit confusing
178
00:06:53,695 --> 00:06:57,279
Essential is going to take this note and this is going to be the no
179
00:06:57,535 --> 00:06:58,559
That is
180
00:06:58,815 --> 00:07:01,375
Running the game is actually in that's what I mean
181
00:07:01,887 --> 00:07:03,679
But what we can do as we can say
182
00:07:03,935 --> 00:07:05,471
We want to change the route
183
00:07:05,727 --> 00:07:07,519
Node that is running again
184
00:07:08,031 --> 00:07:09,567
With this change theme to four
185
00:07:09,823 --> 00:07:15,967
So we could have let's say an entirely new environment or in Thai
186
00:07:16,223 --> 00:07:21,087
Will a new game like if you're doing maybe a game of Mini games or something about nature
187
00:07:21,599 --> 00:07:22,623
Let's Commodus
188
00:07:23,135 --> 00:07:23,903
It's going to rain
189
00:07:24,159 --> 00:07:25,439
And I can show you
190
00:07:25,951 --> 00:07:28,767
What does looks like so let's go and around the game or in a pause
191
00:07:29,023 --> 00:07:31,839
Just waiting on a you go to a remote team
192
00:07:32,351 --> 00:07:34,399
So this is what I'm talking about right you have your room
193
00:07:34,911 --> 00:07:35,935
Which all games have
194
00:07:36,191 --> 00:07:39,775
Then this is our game events are allowed and then the main
195
00:07:40,031 --> 00:07:42,591
Is being loaded from our main scene
196
00:07:42,847 --> 00:07:45,407
So this is just saying what is the
197
00:07:45,663 --> 00:07:47,455
What is the note that is loaded
198
00:07:47,711 --> 00:07:49,503
That is essentially is at the
199
00:07:49,759 --> 00:07:51,551
Of your entire scene
200
00:07:51,807 --> 00:07:52,831
Alongside
201
00:07:53,599 --> 00:07:54,879
And we can swap that
202
00:07:55,135 --> 00:07:56,671
And the way that we can sort that out
203
00:07:58,207 --> 00:07:59,743
Is we can use this
204
00:07:59,999 --> 00:08:00,767
Get 3
205
00:08:01,023 --> 00:08:06,655
Change team to file and in this case we just going to have it point to rest scenes
206
00:08:06,911 --> 00:08:07,679
Main
207
00:08:07,935 --> 00:08:09,215
Main.ts
208
00:08:09,471 --> 00:08:13,823
What does going to do is that going to remove our current main from the same tree over here
209
00:08:14,079 --> 00:08:15,871
And then it's going to load this file
210
00:08:16,127 --> 00:08:17,407
And replace that
211
00:08:17,919 --> 00:08:20,735
Effectively it's going to remove our current game state
212
00:08:20,991 --> 00:08:23,295
Load up a new game state and put it back in
213
00:08:23,551 --> 00:08:25,343
And so it's going to be at
214
00:08:25,599 --> 00:08:26,879
We were starting the
215
00:08:27,135 --> 00:08:27,647
Over
216
00:08:27,903 --> 00:08:28,415
Again
217
00:08:28,671 --> 00:08:30,975
What is the purpose of the on reset button
218
00:08:31,487 --> 00:08:36,351
If that's not clear you can always go ahead and read the change seem to file documentation
219
00:08:36,607 --> 00:08:39,423
You will explain in a little bit more detail what's going on
220
00:08:39,679 --> 00:08:40,703
You'll see how that works
221
00:08:40,959 --> 00:08:44,799
And then on quick button press what we're going to do in here as we're going to say get 3
222
00:08:45,055 --> 00:08:45,823
Dart
223
00:08:46,847 --> 00:08:48,127
And then she's going to close
224
00:08:48,639 --> 00:08:54,271
We need this victory screen to actually be spawned in so I'm going to go back to my main scene here
225
00:08:54,527 --> 00:08:59,391
And we have the arena time manager here so let's go ahead and open up this script
226
00:08:59,647 --> 00:09:02,719
And we don't really have much in the way of
227
00:09:03,231 --> 00:09:03,999
Functionality
228
00:09:04,255 --> 00:09:07,839
So I'm going to do is I'm going to create an export variable above this on red
229
00:09:08,095 --> 00:09:09,119
Add Explorer
230
00:09:09,375 --> 00:09:09,887
Bar
231
00:09:10,143 --> 00:09:11,167
Victory screen
232
00:09:11,935 --> 00:09:12,959
And I'm gonna call this
233
00:09:13,215 --> 00:09:14,239
Victory screen
234
00:09:14,495 --> 00:09:15,519
Sea inlet say
235
00:09:15,775 --> 00:09:17,823
And then this is a type of packed scene
236
00:09:19,103 --> 00:09:23,199
How many go to my Arena time manager seen by clicking the opening editor button here
237
00:09:23,455 --> 00:09:24,991
I'm gonna click that rude mode
238
00:09:25,247 --> 00:09:26,783
Go back to my inspector time
239
00:09:27,295 --> 00:09:30,879
And then I'm going to in my file system search for Victory screen
240
00:09:31,391 --> 00:09:33,695
And drag over the tsyn on the
241
00:09:34,207 --> 00:09:37,279
So now we have the victory screen scene loaded
242
00:09:37,791 --> 00:09:40,095
And we need to connect to this timer
243
00:09:40,351 --> 00:09:42,911
Time out right because our timer is currently set
244
00:09:43,167 --> 00:09:44,703
Have a great time of 60
245
00:09:45,215 --> 00:09:47,263
So when that timer runs out
246
00:09:47,775 --> 00:09:48,543
We want to
247
00:09:48,799 --> 00:09:50,335
Basically display the Vic
248
00:09:51,103 --> 00:09:55,199
Search create a new function actually not a new function working at override
249
00:09:55,455 --> 00:09:56,735
The ready method here
250
00:09:56,991 --> 00:09:58,527
And we're going to say timer
251
00:09:58,783 --> 00:09:59,807
Time out
252
00:10:00,345 --> 00:10:02,248
Subtitled by
online-courses.club
We compress knowledge for you!
253
00:10:02,250 --> 00:10:00,831
Connect
254
00:10:01,599 --> 00:10:02,111
On
255
00:10:02,367 --> 00:10:02,879
Timer
256
00:10:03,135 --> 00:10:04,927
Timeout let's Create that function
257
00:10:06,975 --> 00:10:09,535
And I am going to start picking up the pace a little bit
258
00:10:09,791 --> 00:10:11,839
The programming because we've done a lot of this already
259
00:10:12,095 --> 00:10:12,863
Console
260
00:10:13,119 --> 00:10:17,215
Removal of it faster Service course can be finished in a reasonable amount of time
261
00:10:17,727 --> 00:10:22,079
In this on timer timeout what we're going to do is going to spawn this victory screen
262
00:10:22,335 --> 00:10:23,615
So we're going to say
263
00:10:24,127 --> 00:10:24,639
Via
264
00:10:24,895 --> 00:10:25,919
Victory
265
00:10:26,687 --> 00:10:27,711
Screen
266
00:10:28,479 --> 00:10:31,551
Instance is equal to Victory screens
267
00:10:31,807 --> 00:10:32,575
Scene
268
00:10:33,087 --> 00:10:34,367
Shark instancia
269
00:10:34,623 --> 00:10:35,391
We're going to
270
00:10:35,903 --> 00:10:37,183
That is a child
271
00:10:39,999 --> 00:10:43,583
And that should basically be it now there is one thing we need to do
272
00:10:43,839 --> 00:10:47,167
Which is let's go and open our victory screen seen again
273
00:10:48,191 --> 00:10:51,007
You'll notice that was setting the tree to paused in here
274
00:10:51,519 --> 00:10:56,127
Right so there's a couple of problems we need to set the tree to unpause
275
00:10:56,383 --> 00:10:59,199
When we click the restart button so it can't be this line
276
00:11:00,735 --> 00:11:01,503
Paste it above
277
00:11:01,759 --> 00:11:03,551
The change the M25
278
00:11:03,807 --> 00:11:05,599
NN change the park
279
00:11:06,111 --> 00:11:06,623
False
280
00:11:06,879 --> 00:11:09,695
And then we need to go to a victory screen route
281
00:11:10,207 --> 00:11:13,535
Scroll down to the process mode and make sure that it's
282
00:11:13,791 --> 00:11:14,303
Always
283
00:11:14,815 --> 00:11:16,095
So that this does not pass
284
00:11:16,351 --> 00:11:16,863
Itself
285
00:11:18,143 --> 00:11:20,703
Let's go back to Arena time manager
286
00:11:21,215 --> 00:11:24,799
For the timer I'm just going to turn it down to five seconds to see if the
287
00:11:25,055 --> 00:11:26,079
Play some victory screen mobile
288
00:11:26,591 --> 00:11:27,871
So let's go ahead around the game
289
00:11:28,127 --> 00:11:30,431
As soon as it's 5 seconds we should save it
290
00:11:30,943 --> 00:11:33,503
For Victory and I can click restart
291
00:11:33,759 --> 00:11:34,783
2 minutes
292
00:11:35,295 --> 00:11:38,879
And you can see that the game restarts from the beginning and we should see a victory again
293
00:11:39,903 --> 00:11:41,695
And let's go ahead and
294
00:11:41,951 --> 00:11:42,463
Quit
295
00:11:42,719 --> 00:11:43,743
And the game clothes
296
00:11:44,255 --> 00:11:45,791
So that's a very rough
297
00:11:46,047 --> 00:11:51,167
Victory screen in the next lesson we're going to do something very similar were going to create the
298
00:11:51,423 --> 00:11:51,935
Death
299
00:11:52,191 --> 00:11:52,703
Stream
300
00:11:52,959 --> 00:11:54,495
The hello player that's for the players
301
00:11:54,751 --> 00:11:55,519
I think it's a lot
302
00:11:55,775 --> 00:11:57,823
And I'll see you in that lesson
20509
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.