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:05,632
Now that we have our meta upgrade card it's time to create a UI
2
00:00:06,144 --> 00:00:08,192
Through which the player can actually
3
00:00:08,448 --> 00:00:09,728
Acquire upgrades
4
00:00:10,240 --> 00:00:15,616
And before we actually work on a UI we don't have a way to specify a
5
00:00:15,872 --> 00:00:17,152
Experience cost
6
00:00:17,664 --> 00:00:18,176
4
7
00:00:18,688 --> 00:00:19,712
The Opera
8
00:00:19,968 --> 00:00:23,040
So let's go ahead and open up our resources folder
9
00:00:23,296 --> 00:00:24,064
Measure up
10
00:00:24,576 --> 00:00:26,880
And that's open up Armada upgrade rgd
11
00:00:27,136 --> 00:00:28,928
And just below the max quantity
12
00:00:29,184 --> 00:00:31,488
Let's export a variable
13
00:00:32,000 --> 00:00:32,768
Call
14
00:00:33,280 --> 00:00:34,304
Experience cost
15
00:00:35,072 --> 00:00:36,608
And that will be able to type in
16
00:00:36,864 --> 00:00:40,704
What's on at 2:10 by the fault just had some value is there
17
00:00:41,216 --> 00:00:47,360
Alright so now we have a way of specifying the experience cost and our experience keen.com
18
00:00:47,616 --> 00:00:50,176
I'm here should have the experience cost of 10
19
00:00:50,432 --> 00:00:52,992
I'm actually gonna bump that up to 100 through here
20
00:00:53,248 --> 00:00:59,392
Just because this is actually a relatively powerful upgrade all right so now it's work on our UI 4
21
00:00:59,648 --> 00:01:00,397
Collecting those eyes
22
00:01:00,399 --> 00:01:02,875
Subtitled by
online-courses.club
We compress knowledge for you!
23
00:01:02,876 --> 00:01:07,328
So are you I that we want to use for selecting the items is actually going to be very similar to the options menu were going to do it
24
00:01:07,584 --> 00:01:08,352
Transition
25
00:01:08,608 --> 00:01:10,656
Into that upgrade screen
26
00:01:10,912 --> 00:01:13,472
And then we're going to have a bunch of
27
00:01:13,728 --> 00:01:14,752
Cards in there
28
00:01:15,264 --> 00:01:18,592
So what I'm going to do is I'm going to search for the options menu here
29
00:01:19,104 --> 00:01:23,456
I'm going to duplicate the options menu by selecting it and then pressing ctrl d
30
00:01:23,968 --> 00:01:26,016
No do I call this method
31
00:01:26,272 --> 00:01:27,040
Menu
32
00:01:27,552 --> 00:01:28,064
And Dougal
33
00:01:28,576 --> 00:01:30,880
Open up that Meadow menu
34
00:01:31,648 --> 00:01:33,696
And here's our Meadow menu
35
00:01:34,464 --> 00:01:39,072
Now I mostly just duplicated outside the vineyard and the tilemap are here
36
00:01:39,584 --> 00:01:42,144
I'm going to rename this Meadow menu
37
00:01:42,912 --> 00:01:44,704
Rename the root note
38
00:01:45,728 --> 00:01:47,776
What we really want as actually
39
00:01:48,032 --> 00:01:52,384
Mostly all of this is going to go away so I'm going to delete this panel container right here
40
00:01:53,408 --> 00:01:57,760
Alright so now we just have our margin container which is filling up our screen
41
00:01:58,272 --> 00:01:59,040
And
42
00:01:59,296 --> 00:02:03,392
What we're going to do is we probably need to introduce
43
00:02:03,904 --> 00:02:04,416
A
44
00:02:04,672 --> 00:02:08,000
Grid-container so let's go ahead and add a grid container
45
00:02:08,256 --> 00:02:14,144
And the grid container does exactly what it sounds like it displays all of the child elements in a grid
46
00:02:14,400 --> 00:02:15,680
In order to test this
47
00:02:15,936 --> 00:02:19,264
Let's go ahead and instantiate a metre upgrade card
48
00:02:19,776 --> 00:02:20,544
Like so
49
00:02:20,800 --> 00:02:23,616
And then let's just go ahead and
50
00:02:24,128 --> 00:02:24,640
Duplicate
51
00:02:24,896 --> 00:02:28,992
Alright so are we seeing as there are two cards do not fit on the same screen
52
00:02:29,248 --> 00:02:29,760
Let's
53
00:02:30,016 --> 00:02:31,552
Duplicate let's just have three
54
00:02:32,064 --> 00:02:34,880
We need our grid container to be 3 columns
55
00:02:35,648 --> 00:02:36,416
Like so
56
00:02:37,184 --> 00:02:40,512
We can change the spacing of the great as well
57
00:02:40,768 --> 00:02:43,584
With the age separation and V separation
58
00:02:44,096 --> 00:02:47,936
The first I'm going to say like my margin container and add margin
59
00:02:48,704 --> 00:02:52,032
So I'm going to go to the market and go to the constant section
60
00:02:52,544 --> 00:02:53,568
130 mobile
61
00:02:53,824 --> 00:02:56,896
And then give it a margin of Eden Hall directions
62
00:02:57,152 --> 00:02:59,200
And actually I might do 16 instead
63
00:03:00,480 --> 00:03:02,528
Is that give us a nice amount of padding
64
00:03:03,040 --> 00:03:04,576
On the left in the tops
65
00:03:05,600 --> 00:03:09,440
Before we go any further I'm going to remove the script from this menu
66
00:03:09,696 --> 00:03:10,464
Like so
67
00:03:10,720 --> 00:03:12,768
Now that we've got those margins configured
68
00:03:13,024 --> 00:03:14,304
Let's figure out why
69
00:03:14,560 --> 00:03:16,352
Separation we need to do in the Bridge Inn
70
00:03:17,120 --> 00:03:20,192
So basically we have the cards which are 170 pixels
71
00:03:20,448 --> 00:03:20,960
Why
72
00:03:21,216 --> 00:03:23,264
And so basically we need to figure out what
73
00:03:23,776 --> 00:03:28,128
Spacing between each card is appropriate in the X Direction
74
00:03:28,384 --> 00:03:33,504
Just going to take a little bit of a mess but if we look at our display window we have a viewport width of 6-ft
75
00:03:34,016 --> 00:03:36,832
There should be a spacing of 49 so I just did all that
76
00:03:37,344 --> 00:03:39,136
Sorry I'm off screen but that's how
77
00:03:39,392 --> 00:03:40,928
That's how the math works in Sale
78
00:03:41,184 --> 00:03:44,256
Let's select a grid container and scroll down to the
79
00:03:44,512 --> 00:03:45,536
Age separation
80
00:03:45,792 --> 00:03:48,352
And let's put 49-in for the 8th of April
81
00:03:48,864 --> 00:03:51,936
And we should be perfectly on the edge here so now
82
00:03:52,448 --> 00:03:54,496
Our cards are perfectly spaced out
83
00:03:54,752 --> 00:03:56,032
Now if you wanted to
84
00:03:56,288 --> 00:03:58,336
You could try and make the spacing
85
00:03:58,592 --> 00:04:00,896
Between the edges and each individual card
86
00:04:01,664 --> 00:04:02,688
A little bit more
87
00:04:02,944 --> 00:04:06,016
And I might try to do that so I'm going to go to my margin container
88
00:04:06,272 --> 00:04:09,344
I'm going to give it a margin-left of
89
00:04:10,112 --> 00:04:13,184
24 which is an increase of 8 in immersion
90
00:04:13,440 --> 00:04:15,488
Of 24 which is an increase of 8
91
00:04:15,744 --> 00:04:17,791
I'm going to subtract 8 from the 8th
92
00:04:18,047 --> 00:04:20,095
Separations that I have for you
93
00:04:20,863 --> 00:04:24,191
So that didn't make a huge difference but the space is all about more even
94
00:04:24,447 --> 00:04:29,567
You can also you can play with that space in to get it to work exactly unfortunately the grid-container
95
00:04:30,079 --> 00:04:32,895
Doesn't really have a great way of lining things
96
00:04:33,151 --> 00:04:36,479
One other thing you can do is change the 8 separation to something like
97
00:04:36,735 --> 00:04:37,247
16
98
00:04:37,503 --> 00:04:38,527
And then
99
00:04:38,783 --> 00:04:41,343
What you can do is change the container sizes
100
00:04:41,599 --> 00:04:43,903
From cell to shrink Centre
101
00:04:44,415 --> 00:04:47,231
And that we'll centre it a little bit with even spacing between
102
00:04:47,487 --> 00:04:52,351
So whatever method you want to use for spacing is fine I think I'll leave it like this cause this looks pretty good actually
103
00:04:52,863 --> 00:04:55,935
So now we actually need to create the car
104
00:04:56,191 --> 00:04:56,703
So
105
00:04:56,959 --> 00:04:59,263
I'm going to remove all these cards here
106
00:05:00,031 --> 00:05:01,823
Because they just for testing purposes
107
00:05:02,079 --> 00:05:03,871
And I'm going to have a script to this many men
108
00:05:04,639 --> 00:05:09,759
And the first thing we need to do this we need a preload the major upgrade cards I'm going to save our
109
00:05:10,015 --> 00:05:13,855
Meta upgrade card seen is equal to preload
110
00:05:14,367 --> 00:05:15,135
Meadow
111
00:05:16,159 --> 00:05:16,927
Upgrade
112
00:05:17,439 --> 00:05:17,951
Car
113
00:05:18,207 --> 00:05:19,487
Dirty syn
114
00:05:19,743 --> 00:05:21,791
So this is the line here
115
00:05:22,047 --> 00:05:27,423
Now he did it actually load or upgrades and we can actually make this and export variable for user
116
00:05:27,935 --> 00:05:30,239
So let's export that
117
00:05:30,751 --> 00:05:32,287
Variable and we'll call it
118
00:05:32,799 --> 00:05:33,823
Abrade
119
00:05:34,591 --> 00:05:35,871
What does got upgraded
120
00:05:36,127 --> 00:05:37,919
That will be of type array
121
00:05:38,175 --> 00:05:39,199
Metre upgrade
122
00:05:39,711 --> 00:05:43,807
Like so and then we're going to initialise that to an empty array
123
00:05:44,831 --> 00:05:45,855
So
124
00:05:46,111 --> 00:05:47,391
On a ready-made
125
00:05:48,159 --> 00:05:53,279
Let's iterate over all of us upgrades also for upgrades in upgrades
126
00:05:53,791 --> 00:05:54,559
What are we going to
127
00:05:55,071 --> 00:05:58,143
We're going to save Armada upgrade card
128
00:05:58,655 --> 00:06:01,215
Instance is equal to Meadow upgrade
129
00:06:01,471 --> 00:06:03,519
Card seeing that instead
130
00:06:04,031 --> 00:06:04,799
Like
131
00:06:05,823 --> 00:06:08,895
And we need to grab a reference to the grid container
132
00:06:09,407 --> 00:06:10,687
So I'm going to
133
00:06:10,943 --> 00:06:14,271
Right click the grid container access as unique name
134
00:06:14,527 --> 00:06:16,319
Turn on ready
135
00:06:18,111 --> 00:06:19,135
Bar on red
136
00:06:19,391 --> 00:06:21,183
I'm going to say my voice
137
00:06:21,439 --> 00:06:22,207
Create container
138
00:06:23,231 --> 00:06:24,511
Is equal to
139
00:06:25,023 --> 00:06:26,303
Dollar sign for Sen
140
00:06:26,559 --> 00:06:27,583
Create container
141
00:06:28,095 --> 00:06:30,911
And again you don't need to use the dollar sign if you don't want to
142
00:06:31,423 --> 00:06:32,703
I decided to use it for a concert
143
00:06:32,959 --> 00:06:35,775
That we've got a reference to agree container
144
00:06:36,031 --> 00:06:39,103
Let's go back to our for loop and say grid-container
145
00:06:39,359 --> 00:06:40,639
Add child
146
00:06:41,919 --> 00:06:42,431
Meta
147
00:06:42,687 --> 00:06:43,455
Upgrade
148
00:06:43,711 --> 00:06:44,223
Card
149
00:06:44,991 --> 00:06:45,503
Instance
150
00:06:48,831 --> 00:06:53,951
Now we can just test this real quick so I just run the scene by heating at 6
151
00:06:54,207 --> 00:06:55,487
So I can run for and see
152
00:06:55,743 --> 00:06:59,839
That did not work because we do not configure or upgrade here so I'm going to
153
00:07:00,351 --> 00:07:02,399
Click into the upgrades array here
154
00:07:02,655 --> 00:07:07,263
Increase the size 21 and then drag over the experience game to the first
155
00:07:08,031 --> 00:07:08,799
Element
156
00:07:09,055 --> 00:07:10,335
And now I Run the game
157
00:07:11,103 --> 00:07:12,639
Now you can see that we've got to
158
00:07:12,895 --> 00:07:13,663
Option in here
159
00:07:14,175 --> 00:07:16,223
And obviously nothing is Hooked Up
160
00:07:16,479 --> 00:07:22,623
Alright so what are we going to do well back in our for loop what we need to do as we need to say met up
161
00:07:22,879 --> 00:07:24,415
Play card instant darts
162
00:07:24,671 --> 00:07:25,439
Upgrade
163
00:07:26,207 --> 00:07:26,975
2
164
00:07:27,231 --> 00:07:30,303
Our upgrade that were currently looking at from this array
165
00:07:30,815 --> 00:07:33,119
And I'm going to open up my
166
00:07:33,887 --> 00:07:34,655
Meta
167
00:07:35,167 --> 00:07:35,935
Upgrade
168
00:07:36,447 --> 00:07:36,959
Card
169
00:07:37,471 --> 00:07:38,495
And look at this
170
00:07:40,287 --> 00:07:43,103
The function of extra cold SET M upgrade
171
00:07:43,359 --> 00:07:44,383
And that's what we want to do
172
00:07:44,639 --> 00:07:46,431
So back in the meadow menu
173
00:07:46,687 --> 00:07:49,759
Let's call this a set metre upgrade instead
174
00:07:50,015 --> 00:07:51,551
Because that's the proper function
175
00:07:51,807 --> 00:07:53,343
And that should be fine
176
00:07:53,855 --> 00:07:56,159
Now in arm upgrade car
177
00:07:56,671 --> 00:07:57,951
If we go back to the sky
178
00:07:58,207 --> 00:07:59,999
We actually need to update
179
00:08:00,511 --> 00:08:01,023
The
180
00:08:01,279 --> 00:08:02,303
Progress bar
181
00:08:02,559 --> 00:08:04,607
Right we need to set this value
182
00:08:05,119 --> 00:08:06,399
To be some process
183
00:08:07,167 --> 00:08:08,703
So I'm going to
184
00:08:08,959 --> 00:08:11,007
In America upgrade card scene
185
00:08:11,519 --> 00:08:15,359
Right-click the progress bar set access as unique name
186
00:08:15,871 --> 00:08:20,223
And then let's grab that in the on ready here and we're going to do it different way this time
187
00:08:20,735 --> 00:08:22,271
Drag the progress bar over
188
00:08:22,527 --> 00:08:24,063
Hold control in Drogheda
189
00:08:24,575 --> 00:08:26,111
To generate the automatic
190
00:08:26,367 --> 00:08:28,415
Line I'm just going to put a door sign in
191
00:08:29,951 --> 00:08:32,255
We want to create a new function called
192
00:08:32,511 --> 00:08:33,023
Date
193
00:08:34,815 --> 00:08:35,583
Progress
194
00:08:36,351 --> 00:08:40,191
And why do we want to do that because as soon as we purchased something
195
00:08:40,447 --> 00:08:45,055
We're going to want to upgrade only the progress but for every single card right
196
00:08:45,823 --> 00:08:51,455
We don't want to recall you know set men upgrade because that's unnecessary so we can create an update progress
197
00:08:51,967 --> 00:08:54,015
And how are we going to do this one
198
00:08:54,271 --> 00:08:55,551
What's Right pass in here
199
00:08:55,807 --> 00:08:56,319
First
200
00:08:56,575 --> 00:09:00,415
And we actually need a store a reference to the upgrade that zombie
201
00:09:00,671 --> 00:09:01,439
Past
202
00:09:02,207 --> 00:09:02,719
So let's
203
00:09:03,231 --> 00:09:05,023
Create a new variable called upgrade
204
00:09:05,535 --> 00:09:07,327
Make it of type major upgrades
205
00:09:08,095 --> 00:09:11,423
And then we call set better upgrade here let's just set
206
00:09:13,471 --> 00:09:15,263
Southdown upgrades is equal to
207
00:09:15,775 --> 00:09:18,335
Why do we need to use self upgrade
208
00:09:18,591 --> 00:09:22,943
Because upgrade is coming in here and doing what is known as shadowing
209
00:09:23,199 --> 00:09:23,967
Meaning that
210
00:09:24,735 --> 00:09:26,271
If we use upgrades
211
00:09:26,527 --> 00:09:27,551
In this blog
212
00:09:28,063 --> 00:09:31,647
It's going to refer to the upgrades that is coming in as
213
00:09:31,903 --> 00:09:32,671
Argument
214
00:09:32,927 --> 00:09:33,951
Or a parameter
215
00:09:34,207 --> 00:09:36,511
Rather than the upgrade this to find a p
216
00:09:37,023 --> 00:09:39,071
But by using the keyword self
217
00:09:39,327 --> 00:09:40,607
We are referencing
218
00:09:41,375 --> 00:09:45,471
The upgrade that is attached to this instance and not the upgrade that is
219
00:09:45,727 --> 00:09:46,239
Here
220
00:09:46,495 --> 00:09:47,007
Example
221
00:09:47,519 --> 00:09:49,823
Then after I sign the upgrade
222
00:09:50,335 --> 00:09:54,175
We are going to at the end of the sat nav upgrade call update
223
00:09:54,431 --> 00:09:55,199
Progress
224
00:09:55,711 --> 00:09:57,247
And then here we calc
225
00:09:57,503 --> 00:09:59,551
The percent so we're going to save our percent
226
00:10:00,345 --> 00:10:02,248
Subtitled by
online-courses.club
We compress knowledge for you!
227
00:10:02,250 --> 00:10:02,111
Is equal to meta progression
228
00:10:03,903 --> 00:10:04,927
Save data
229
00:10:05,439 --> 00:10:07,487
Anarchy which is called
230
00:10:07,743 --> 00:10:11,071
And I forgot what it was called so I'm going to open up my medal progression
231
00:10:11,327 --> 00:10:12,095
Scene
232
00:10:12,607 --> 00:10:14,399
And it is cold
233
00:10:15,167 --> 00:10:16,703
Metre upgrade currency
234
00:10:17,983 --> 00:10:20,031
So I go back to my metre
235
00:10:20,287 --> 00:10:21,567
Upgrade kardia
236
00:10:22,335 --> 00:10:23,359
Pasted in there
237
00:10:23,615 --> 00:10:26,431
So were getting the value of the data
238
00:10:26,687 --> 00:10:27,199
The key
239
00:10:27,455 --> 00:10:28,479
Meteora Greece
240
00:10:28,735 --> 00:10:31,039
Which is going to be an integer
241
00:10:31,295 --> 00:10:32,575
I'm going to take that
242
00:10:32,831 --> 00:10:34,367
I'm going to divide that by
243
00:10:34,623 --> 00:10:36,415
The upgrade
244
00:10:38,463 --> 00:10:39,487
Experience cost
245
00:10:39,999 --> 00:10:40,767
So I'm taking the car
246
00:10:41,279 --> 00:10:44,095
Currency essentially and then dividing it by the upgrade
247
00:10:44,351 --> 00:10:47,423
Now this could be a value larger than 1
248
00:10:47,935 --> 00:10:52,799
So what we're going to do as we're just going to reassign percent will say percent is equal to
249
00:10:53,055 --> 00:10:54,335
The minimum of
250
00:10:54,591 --> 00:10:55,615
Percent and
251
00:10:58,431 --> 00:10:59,455
So simply saying
252
00:10:59,711 --> 00:11:02,015
Take whichever one smaller 1 or percent
253
00:11:02,783 --> 00:11:04,831
And then we can set our Private bar
254
00:11:05,599 --> 00:11:06,623
Start value
255
00:11:06,879 --> 00:11:07,903
Is equal to
256
00:11:08,159 --> 00:11:08,671
Percent
257
00:11:09,439 --> 00:11:09,951
Alright
258
00:11:10,207 --> 00:11:14,303
So there's one of the things we need to do and that is we need to disable this purchase but
259
00:11:14,815 --> 00:11:15,839
If the
260
00:11:16,095 --> 00:11:17,887
Progress is not 100-percent
261
00:11:18,143 --> 00:11:21,215
So let's grab a reference to this purchase button
262
00:11:21,471 --> 00:11:22,751
In the already here
263
00:11:23,519 --> 00:11:26,079
Time is going to do that little quick trick again
264
00:11:26,335 --> 00:11:31,199
So drag over and then once you're covering over the line hold control and release the mouse button
265
00:11:32,223 --> 00:11:33,503
And so now we've got
266
00:11:33,759 --> 00:11:35,295
A reference to the purchase but
267
00:11:36,063 --> 00:11:37,599
And I'm going to set
268
00:11:37,855 --> 00:11:39,647
Any update progress method
269
00:11:40,159 --> 00:11:40,927
Purchase bot
270
00:11:41,183 --> 00:11:42,463
Start disabled
271
00:11:43,487 --> 00:11:44,767
Is equal to
272
00:11:45,279 --> 00:11:46,047
Percent
273
00:11:47,839 --> 00:11:48,607
West End
274
00:11:50,143 --> 00:11:54,239
So what is this do well percent less than 1 resolves to either true or false
275
00:11:54,495 --> 00:11:57,823
And as what were the signing to the disabled property here
276
00:11:58,079 --> 00:12:01,151
So that means that if present a lesson one then disable this
277
00:12:02,431 --> 00:12:08,063
And there's one more thing that we need to do and that is we need to make the upgrade actually added to the save data
278
00:12:08,575 --> 00:12:11,135
When the purchase button is clicked
279
00:12:11,391 --> 00:12:12,927
What we can do is
280
00:12:13,183 --> 00:12:14,207
In the ready method
281
00:12:14,719 --> 00:12:15,231
Wheel
282
00:12:15,999 --> 00:12:17,279
Take the purchase button
283
00:12:18,559 --> 00:12:21,887
Connect to the press signal by doing dark pressed
284
00:12:22,399 --> 00:12:23,679
On purchase
285
00:12:24,191 --> 00:12:24,703
Breasts
286
00:12:25,983 --> 00:12:28,287
Alright and then let's go down to the very bottom
287
00:12:29,055 --> 00:12:31,359
Let's Create that function on purchase
288
00:12:31,871 --> 00:12:32,383
Press
289
00:12:34,175 --> 00:12:37,247
And then we can do is very simple we can say meta progression
290
00:12:40,319 --> 00:12:41,855
Add mirror upgrade
291
00:12:42,623 --> 00:12:44,159
And we're going to pass in the upgrade
292
00:12:44,671 --> 00:12:46,719
So again this upgrade it prefers to this
293
00:12:47,231 --> 00:12:49,023
Now let's be a little bit save here
294
00:12:49,279 --> 00:12:52,351
And I'm going to do a check in the on purchase press
295
00:12:52,607 --> 00:12:55,679
And that check is going to basically being all check
296
00:12:55,935 --> 00:12:57,471
I will say if upgrade
297
00:12:57,727 --> 00:12:58,751
Is equal to null
298
00:12:59,263 --> 00:13:01,055
Then I'm just going to turn out
299
00:13:02,591 --> 00:13:03,103
Ok
300
00:13:04,127 --> 00:13:06,943
So now that all of that is set up
301
00:13:07,199 --> 00:13:08,991
There's one more thing that we want to do
302
00:13:10,015 --> 00:13:10,783
And I'm gonna
303
00:13:11,039 --> 00:13:13,855
Control click into this admin upgrade Hero
304
00:13:14,111 --> 00:13:17,183
And I'm actually going to call save
305
00:13:18,207 --> 00:13:22,303
Right after we had a metre upgrade so in here I'm just going to call save
306
00:13:22,815 --> 00:13:26,399
Socially Everytime We add in bed upgrade the files going to be
307
00:13:26,911 --> 00:13:30,239
Let's go ahead and go back to our menu
308
00:13:30,751 --> 00:13:34,079
Let's go in a run ok and we have a minor issue
309
00:13:34,847 --> 00:13:39,711
In a set manner upgrade function this upgrade that name this is actually called upgrade Dad
310
00:13:40,223 --> 00:13:40,735
Tidal
311
00:13:41,759 --> 00:13:43,295
But I think everything else
312
00:13:43,551 --> 00:13:45,087
Here is fine
313
00:13:45,599 --> 00:13:48,159
So let's go ahead and run it again
314
00:13:48,415 --> 00:13:49,183
With this
315
00:13:49,439 --> 00:13:50,719
Ron currency but
316
00:13:51,999 --> 00:13:55,839
And look at that for progress bar has been reset our button is disabled
317
00:13:56,095 --> 00:13:58,911
And we have the title and the
318
00:13:59,167 --> 00:13:59,679
Text
319
00:14:00,191 --> 00:14:02,751
Being displayed properly based on the description
320
00:14:03,519 --> 00:14:05,055
So now we just need to update
321
00:14:05,311 --> 00:14:05,823
To this
322
00:14:06,079 --> 00:14:08,639
This text right here this 50 out of 200
323
00:14:09,151 --> 00:14:11,455
So let's go back to Armada upgrade card
324
00:14:12,223 --> 00:14:13,759
Open up the 2D
325
00:14:14,527 --> 00:14:15,807
Views that we can see this
326
00:14:16,831 --> 00:14:19,391
Let's call this the progress label
327
00:14:19,647 --> 00:14:22,719
So this label that contains that 50/200 text right there
328
00:14:23,743 --> 00:14:24,255
And
329
00:14:24,511 --> 00:14:26,303
Let's go in and right click and
330
00:14:26,815 --> 00:14:28,607
Like access as unique name
331
00:14:29,119 --> 00:14:31,167
Go back into that Meadow upgrade car
332
00:14:31,679 --> 00:14:36,543
And that will be part of the update progress as well so I'm going to grab on ready reference
333
00:14:37,055 --> 00:14:41,407
To this progress label like so and then I'm simply going to see him
334
00:14:42,687 --> 00:14:44,735
Progress label text
335
00:14:44,991 --> 00:14:45,759
Is equal to
336
00:14:46,271 --> 00:14:50,111
We're going to crab this meta progression currency again so let's
337
00:14:50,367 --> 00:14:51,391
Create a new variable called
338
00:14:52,159 --> 00:14:52,671
Currency
339
00:14:53,439 --> 00:14:54,975
What's that equal to this
340
00:14:56,511 --> 00:14:58,047
I'm just going to cut and paste that
341
00:14:58,559 --> 00:15:03,167
Then the present is going to be the currency / the upgrade that experience cost
342
00:15:03,423 --> 00:15:05,471
And an appropriate label text as going to be
343
00:15:05,727 --> 00:15:06,495
String
344
00:15:07,007 --> 00:15:07,775
STR
345
00:15:08,543 --> 00:15:09,055
Currency
346
00:15:10,335 --> 00:15:11,103
Plus
347
00:15:11,359 --> 00:15:12,127
In quotes
348
00:15:12,383 --> 00:15:13,407
Slash
349
00:15:13,663 --> 00:15:14,687
Annum Plus
350
00:15:16,223 --> 00:15:17,247
STR
351
00:15:17,759 --> 00:15:18,783
Upgrade
352
00:15:19,039 --> 00:15:19,551
Start
353
00:15:20,575 --> 00:15:21,599
Experian score
354
00:15:24,159 --> 00:15:27,999
Alright son now if I go to my menu and run the scene again
355
00:15:28,511 --> 00:15:33,119
You could see that now it says I have 1 out of 100 experience required
356
00:15:34,143 --> 00:15:35,423
And just for
357
00:15:35,679 --> 00:15:37,215
The sake of completeness
358
00:15:37,471 --> 00:15:40,543
I'm going to go ahead and collect some experience and then die
359
00:15:41,311 --> 00:15:42,847
And then run that seem again
360
00:15:43,103 --> 00:15:44,639
To see if that number updates
361
00:15:45,919 --> 00:15:52,063
Ok so I'm going to quit the game now I'm going to run this again and you can see now that I've got 16 out of
362
00:15:52,319 --> 00:15:52,831
Experience
363
00:15:53,087 --> 00:15:54,623
So there is definitely updating
364
00:15:54,879 --> 00:15:59,743
Alright there is just a couple tidying things to do
365
00:15:59,999 --> 00:16:01,023
Before we are
366
00:16:01,791 --> 00:16:03,839
Basically done with the screen
367
00:16:04,095 --> 00:16:07,423
And that is that once we purchased the upgrade
368
00:16:07,679 --> 00:16:09,471
We actually need to subtract
369
00:16:10,495 --> 00:16:11,519
The data
370
00:16:11,775 --> 00:16:13,567
From the currency total
371
00:16:14,335 --> 00:16:19,455
So I'm going to copy this line again this meta progression save data upgrade currency
372
00:16:19,967 --> 00:16:22,783
After we admit upgrade I'm going to say
373
00:16:23,551 --> 00:16:26,111
Mirror upgrade save data to upgrade currency
374
00:16:26,367 --> 00:16:29,695
- = the upgrade dot experience cost
375
00:16:30,207 --> 00:16:31,231
Like so
376
00:16:31,487 --> 00:16:36,095
Ok and then we need to call meta progression dad save
377
00:16:36,863 --> 00:16:38,911
And then we need to
378
00:16:39,423 --> 00:16:40,447
Call Abdi
379
00:16:40,703 --> 00:16:41,727
Progress
380
00:16:41,983 --> 00:16:43,519
The progress gets refreshed
381
00:16:44,543 --> 00:16:47,615
And this was actually need to be called for every single
382
00:16:47,871 --> 00:16:49,151
Mega upgrade car
383
00:16:49,407 --> 00:16:52,991
So let's actually go to the murder of record route here go to the Node
384
00:16:53,247 --> 00:16:54,783
And we have a groups here
385
00:16:55,295 --> 00:16:57,343
And it's already part of the upgrade card
386
00:16:57,599 --> 00:16:58,623
Because we
387
00:16:58,879 --> 00:16:59,647
Duplicated
388
00:16:59,903 --> 00:17:04,255
And I'm just going to go here and add the prefix and underscore so that it's got its own group
389
00:17:05,023 --> 00:17:06,047
And then I'm here
390
00:17:06,815 --> 00:17:08,607
We don't want to call update progress
391
00:17:08,863 --> 00:17:12,703
Only on this card we need to call it on all
392
00:17:12,959 --> 00:17:15,775
Meadow upgrade card so we can actually do something really cool here
393
00:17:16,031 --> 00:17:17,567
You can call get three
394
00:17:18,847 --> 00:17:19,871
Call group
395
00:17:20,383 --> 00:17:21,919
And the call group
396
00:17:22,175 --> 00:17:23,455
Takes the group name
397
00:17:23,711 --> 00:17:24,735
Which is meta
398
00:17:24,991 --> 00:17:26,015
Upgrade card
399
00:17:26,527 --> 00:17:28,831
And then the string name which is
400
00:17:29,087 --> 00:17:29,855
Update
401
00:17:31,135 --> 00:17:31,903
Progress
402
00:17:33,951 --> 00:17:40,095
And that's going to do is that's going to get every single note in the matter of great car group and then call the
403
00:17:40,351 --> 00:17:46,495
Method on each one which is update progress so all of our cards are going to be updated all at once in terms of there
404
00:17:47,519 --> 00:17:48,031
Alright
405
00:17:48,287 --> 00:17:51,103
And then we need to take our animationplayer
406
00:17:51,359 --> 00:17:53,663
And play the selected item
407
00:17:53,919 --> 00:17:54,431
So
408
00:17:55,455 --> 00:17:59,807
Down here at the very end of the unpurchased bracelets do animation player
409
00:18:01,087 --> 00:18:01,599
Play
410
00:18:02,367 --> 00:18:02,879
Select
411
00:18:04,415 --> 00:18:06,463
Ok and then one final thing that will do
412
00:18:06,719 --> 00:18:10,559
For testing purposes we'll just override this disabled so
413
00:18:11,071 --> 00:18:14,399
Add a new line called purchase button disabled
414
00:18:14,655 --> 00:18:15,423
Equals false
415
00:18:16,447 --> 00:18:19,263
And now if I run the menu scene
416
00:18:19,519 --> 00:18:20,799
I should be able to clear
417
00:18:21,055 --> 00:18:21,567
So
418
00:18:22,079 --> 00:18:23,103
I'm going to collect purchase
419
00:18:24,383 --> 00:18:28,479
And now I'm at -84 and that animation played so that's great
420
00:18:28,991 --> 00:18:30,271
So that's working well
421
00:18:30,527 --> 00:18:35,135
I'm going to go to my metre upgrade card and remove that line will be hard coded the
422
00:18:35,391 --> 00:18:36,671
Disabled = false
423
00:18:37,183 --> 00:18:37,951
Get rid of that
424
00:18:38,463 --> 00:18:42,815
One final issue to address with our upgrade card and that is
425
00:18:43,327 --> 00:18:45,887
If you go to the menu and you run that
426
00:18:46,143 --> 00:18:46,655
Scene
427
00:18:47,167 --> 00:18:52,799
What you see is that when you click on the card it plays the animation and we only wanted to play
428
00:18:53,055 --> 00:18:53,823
When
429
00:18:54,079 --> 00:18:57,407
The purchase button is pressed and enabled right
430
00:18:57,919 --> 00:19:04,063
And the reason that Dad's still around is because we didn't get rid of this on gym
431
00:19:04,831 --> 00:19:07,903
So go ahead and remove this on gui input
432
00:19:11,999 --> 00:19:14,559
And now you go back to the main menu and go out and play
433
00:19:14,815 --> 00:19:16,863
That animation will no longer play when you
434
00:19:17,119 --> 00:19:17,631
The card
435
00:19:18,143 --> 00:19:19,679
And now the
436
00:19:19,935 --> 00:19:21,727
Upgrade card is in good shape
437
00:19:22,495 --> 00:19:24,543
ARDS are upgrade card is
438
00:19:24,799 --> 00:19:25,823
Basically free
439
00:19:26,847 --> 00:19:27,871
So in the neck
440
00:19:28,383 --> 00:19:28,895
Lesson
441
00:19:29,151 --> 00:19:35,295
We're going to actually make the upgrade functions in game and we're also going to add a live
442
00:19:35,551 --> 00:19:37,087
Indicator on the card itself
443
00:19:37,343 --> 00:19:37,855
Of
444
00:19:38,111 --> 00:19:39,135
How many
445
00:19:39,391 --> 00:19:44,255
Of the upgrades have been chosen right because you can choose an upgrade multiple times theoretically
446
00:19:44,511 --> 00:19:46,303
The user or the player
447
00:19:46,559 --> 00:19:49,887
Has no way of seeing currently how many upgrades
448
00:19:50,143 --> 00:19:50,911
Of each
449
00:19:51,167 --> 00:19:52,191
Type then
450
00:19:52,703 --> 00:19:53,727
So we'll tackle
451
00:19:53,983 --> 00:19:56,031
Both of those things in the next lesson
31298
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.