All language subtitles for 22. Upgrade UI Groundwork

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
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:01,792 Let's create a UI 2 00:00:02,048 --> 00:00:04,864 To present upgrade choices to the player 3 00:00:05,120 --> 00:00:09,472 The first thing we're going to do is run a create a new scene with a root type 4 00:00:09,728 --> 00:00:10,752 Canvas layer 5 00:00:11,264 --> 00:00:12,800 The Grand Prix that canvas layer 6 00:00:13,056 --> 00:00:15,872 Rename this to upgrade screen 7 00:00:16,896 --> 00:00:17,920 Garden save that 8 00:00:18,176 --> 00:00:18,944 And audio 9 00:00:19,200 --> 00:00:19,968 Seems 10 00:00:20,224 --> 00:00:20,992 You are 11 00:00:21,248 --> 00:00:23,040 And save the upgrade screen in 12 00:00:24,320 --> 00:00:25,600 The first Noel beginner 13 00:00:25,856 --> 00:00:27,648 With control a is a Mars 14 00:00:27,904 --> 00:00:28,928 Container 15 00:00:29,440 --> 00:00:31,232 And then in the top toolbar 16 00:00:31,488 --> 00:00:32,000 Click on 17 00:00:32,256 --> 00:00:34,816 The Anchor preset button and change it to the 18 00:00:35,072 --> 00:00:36,608 For wrecked option again 19 00:00:37,120 --> 00:00:38,912 So that we have a margin container that's 20 00:00:39,168 --> 00:00:40,704 Pictures to fill the screen 21 00:00:40,960 --> 00:00:43,776 And then underneath that we're going to add in age box 22 00:00:45,312 --> 00:00:45,824 So 23 00:00:46,080 --> 00:00:47,616 This 8 box container what is it 24 00:00:47,872 --> 00:00:50,176 Well it is a container just like them 25 00:00:50,432 --> 00:00:55,040 Container and remember a container is a control node or a you I know 26 00:00:55,552 --> 00:00:58,112 That automatically controls the size and 27 00:00:58,368 --> 00:01:00,141 Position of its child element 28 00:01:00,143 --> 00:01:02,491 Subtitled by online-courses.club We compress knowledge for you! 29 00:01:02,492 --> 00:01:04,000 Automatic container will control the position of the child elements by 30 00:01:04,256 --> 00:01:07,072 Applying margins around the edges of itself 31 00:01:07,584 --> 00:01:10,400 What an Xbox container does is it online 32 00:01:11,680 --> 00:01:12,448 Horizontal 33 00:01:12,960 --> 00:01:13,728 So if I go home 34 00:01:13,984 --> 00:01:16,032 You don't have to do this but I'm just going to demonstrate 35 00:01:16,288 --> 00:01:17,312 By Alan button 36 00:01:17,568 --> 00:01:18,848 Can I duplicate a cup of tea 37 00:01:19,360 --> 00:01:21,920 You can see that the Xbox container is aligning them 38 00:01:22,176 --> 00:01:23,200 Horizontally neck 39 00:01:23,968 --> 00:01:25,760 And this is what we're going to use the Press 40 00:01:26,016 --> 00:01:26,528 The options 41 00:01:26,784 --> 00:01:27,296 2 hour 42 00:01:27,808 --> 00:01:32,672 Clear ok so what we're going to do under the age box container is first we're going to go to the 43 00:01:32,928 --> 00:01:34,464 Spectra of the 8 box container 44 00:01:34,976 --> 00:01:37,024 Go down two containers sizes 45 00:01:37,536 --> 00:01:40,608 And change both horizontal and vertical to share 46 00:01:40,864 --> 00:01:41,376 Centre 47 00:01:42,400 --> 00:01:44,448 Friends on the other side of the Ajax container 48 00:01:44,704 --> 00:01:47,008 Is in the middle of the March 49 00:01:47,776 --> 00:01:50,848 And then underneath that you asked internal is added child known 50 00:01:51,104 --> 00:01:52,128 I'm really creative 51 00:01:52,384 --> 00:01:53,152 Play panel can't 52 00:01:54,688 --> 00:01:56,480 No you're not going to say anything just yet 53 00:01:56,736 --> 00:01:57,248 However 54 00:01:57,504 --> 00:01:59,040 This is another type of container 55 00:01:59,296 --> 00:02:03,392 Nfi for example change the custom minimum size here to 101 56 00:02:03,904 --> 00:02:04,672 You can see that 57 00:02:04,928 --> 00:02:06,976 It has a panel background 58 00:02:07,232 --> 00:02:09,024 And I'm actually going to 59 00:02:09,280 --> 00:02:11,840 Change this I think I like this 60 00:02:12,096 --> 00:02:13,632 Remind me to change it to be 61 00:02:13,888 --> 00:02:14,656 Perhaps 62 00:02:14,912 --> 00:02:15,936 What's keep it 63 00:02:16,192 --> 00:02:17,984 Maybe 120 in the WI 64 00:02:18,240 --> 00:02:19,264 And then perhaps 65 00:02:19,776 --> 00:02:20,800 150 66 00:02:21,056 --> 00:02:21,568 In the 67 00:02:22,080 --> 00:02:23,104 So it looks kind of 68 00:02:23,360 --> 00:02:24,384 Card you can see 69 00:02:24,640 --> 00:02:25,920 Search panel container 70 00:02:26,176 --> 00:02:29,248 Underneath the panel container let's add another child 71 00:02:29,504 --> 00:02:30,528 The box contain 72 00:02:31,040 --> 00:02:34,624 Sophie box container is just like the h box contain 73 00:02:34,880 --> 00:02:35,392 Accept 74 00:02:35,648 --> 00:02:37,440 8 sticks things further 75 00:02:37,952 --> 00:02:44,096 So we are going to use this for what purpose well we want to display the name and the description 76 00:02:44,352 --> 00:02:45,120 Have the upgrade 77 00:02:45,376 --> 00:02:45,888 That 78 00:02:46,144 --> 00:02:47,424 Is being presented to the player 79 00:02:47,680 --> 00:02:49,472 So what's going on add in label 80 00:02:49,728 --> 00:02:51,264 Underneath the box container 81 00:02:51,520 --> 00:02:54,592 And just write something like test name in here 82 00:02:54,848 --> 00:02:57,664 Another label under the box container 83 00:02:57,920 --> 00:03:00,480 Rename this 12 description 84 00:03:02,272 --> 00:03:03,296 And we can rename 85 00:03:03,552 --> 00:03:05,600 Best top 1 to name label 86 00:03:05,856 --> 00:03:06,368 Just like so 87 00:03:07,136 --> 00:03:09,696 And then a description labelled let's just write something 88 00:03:10,208 --> 00:03:10,720 Right 89 00:03:11,488 --> 00:03:13,024 Psalm description 90 00:03:13,536 --> 00:03:15,584 Here now your notice when you're right 91 00:03:15,840 --> 00:03:18,400 A longer description it actually extends 92 00:03:18,656 --> 00:03:19,168 The 93 00:03:19,424 --> 00:03:20,448 Of the pan 94 00:03:20,960 --> 00:03:24,544 We don't want that to happen because we want all of our upgrade cards 95 00:03:25,056 --> 00:03:26,080 To be the same 96 00:03:26,336 --> 00:03:26,848 Width 97 00:03:27,872 --> 00:03:30,176 What you can do is scroll down 98 00:03:30,432 --> 00:03:32,224 When you have a description label selector 99 00:03:33,248 --> 00:03:35,296 Change the Auto rap mode 100 00:03:35,552 --> 00:03:36,576 To work 101 00:03:37,088 --> 00:03:39,904 So that will do a spares to automatically wrap 102 00:03:40,160 --> 00:03:41,440 As you write 103 00:03:41,696 --> 00:03:42,464 A long 104 00:03:42,720 --> 00:03:43,488 Describe 105 00:03:44,768 --> 00:03:49,888 Ok so what I'm going to do is I'm going to read in the panel container to ability upgrade 106 00:03:50,144 --> 00:03:50,656 Card 107 00:03:50,912 --> 00:03:52,192 And I'm going to write 108 00:03:52,448 --> 00:03:53,216 On this 109 00:03:53,472 --> 00:03:54,752 And I'm going to say 110 00:03:55,008 --> 00:03:56,544 Save range as seen 111 00:03:56,800 --> 00:03:58,592 I'm going to save that in scene 112 00:03:59,104 --> 00:03:59,616 You are 113 00:03:59,872 --> 00:04:01,920 Alongside our upgrades 114 00:04:02,432 --> 00:04:02,944 Save that 115 00:04:03,200 --> 00:04:05,504 Click the scene button right here 116 00:04:05,760 --> 00:04:06,528 To open 117 00:04:06,784 --> 00:04:07,296 Scene 118 00:04:07,552 --> 00:04:11,136 And now we've got her own will seem for an ability upgrade car 119 00:04:11,392 --> 00:04:12,672 That we can use 120 00:04:12,928 --> 00:04:13,952 Multiple times 121 00:04:14,208 --> 00:04:15,232 To display 122 00:04:15,744 --> 00:04:20,095 Let's go out and add a script to the ability to upgrade card with descriptor button up top 123 00:04:20,351 --> 00:04:21,631 And then go ahead and 124 00:04:21,887 --> 00:04:22,399 Create 125 00:04:22,655 --> 00:04:24,959 Ok and wondering if we're going to work 126 00:04:25,215 --> 00:04:28,031 To do is we're just going to create a function 127 00:04:28,543 --> 00:04:29,311 So so far 128 00:04:29,823 --> 00:04:30,335 Set 129 00:04:30,847 --> 00:04:32,127 Ability 130 00:04:32,895 --> 00:04:34,431 And this is going to accept 131 00:04:34,687 --> 00:04:37,247 A variable or a parameter called upgrade 132 00:04:37,503 --> 00:04:38,015 Type 133 00:04:38,527 --> 00:04:39,295 Ability 134 00:04:39,551 --> 00:04:41,087 To be passing in 135 00:04:41,599 --> 00:04:43,135 The resource 136 00:04:43,903 --> 00:04:45,439 To this note 137 00:04:45,695 --> 00:04:47,487 Pass right here for now 138 00:04:47,743 --> 00:04:48,255 And then 139 00:04:48,511 --> 00:04:49,279 Avatar 140 00:04:49,535 --> 00:04:52,607 We want to grab a reference to the name and 141 00:04:53,375 --> 00:04:57,983 So go ahead and highlight both of these by holding ctrl and click and both of the name and description 142 00:04:58,239 --> 00:04:59,007 Blakely 143 00:04:59,263 --> 00:05:01,567 Select access as seen unique 144 00:05:02,079 --> 00:05:04,127 And then we're going to do an add-on 145 00:05:04,639 --> 00:05:05,151 Bar 146 00:05:05,663 --> 00:05:07,455 Name underscore label 147 00:05:07,711 --> 00:05:09,759 And this is all type label 148 00:05:10,015 --> 00:05:10,783 Is equal to 149 00:05:11,039 --> 00:05:12,063 Dollar sign 150 00:05:12,319 --> 00:05:14,111 Percent name 151 00:05:14,623 --> 00:05:15,135 And again 152 00:05:15,391 --> 00:05:16,415 We're going to do the same 153 00:05:16,671 --> 00:05:17,951 With the description 154 00:05:21,279 --> 00:05:22,815 And you can if you want 155 00:05:23,071 --> 00:05:24,863 You can use the force 156 00:05:25,375 --> 00:05:26,911 Pass if you want to like the 157 00:05:27,679 --> 00:05:30,495 But I prefer to use the short hand saw 158 00:05:31,007 --> 00:05:32,799 Dollar sign for Sen 159 00:05:33,055 --> 00:05:33,823 Description 160 00:05:34,335 --> 00:05:38,175 Ok so in Irish setter Billy upgrade function you can probably guess what we're going to do 161 00:05:38,431 --> 00:05:41,503 What we're going to do as we're going to say name underscore label 162 00:05:41,759 --> 00:05:43,551 Text to set the 163 00:05:44,063 --> 00:05:45,855 Eagles upgrades at name 164 00:05:46,367 --> 00:05:47,135 And then 165 00:05:47,391 --> 00:05:48,159 Underneath 166 00:05:48,415 --> 00:05:50,975 Description label that text is equal to up 167 00:05:52,767 --> 00:05:54,047 Sorry upgrade door 168 00:05:54,559 --> 00:05:55,071 Description 169 00:05:56,095 --> 00:05:57,631 So that will update our two 170 00:05:57,887 --> 00:05:59,167 According to what we've said 171 00:05:59,679 --> 00:06:01,983 The ability upgrades and just as a side note 172 00:06:02,239 --> 00:06:05,055 This is an example of separating data from large 173 00:06:05,311 --> 00:06:07,359 Right so we have a generic card 174 00:06:07,615 --> 00:06:10,431 There is a built for the purpose of displaying any ability 175 00:06:10,943 --> 00:06:15,039 The Billy upgraded coming in we don't know what specific upgrade this is 176 00:06:15,295 --> 00:06:17,087 We just know that we're expecting 177 00:06:17,599 --> 00:06:18,367 This data 178 00:06:18,623 --> 00:06:19,391 And so we can 179 00:06:20,671 --> 00:06:22,207 Right you can see how we could 180 00:06:22,463 --> 00:06:24,511 Create as many ability of great as if you want 181 00:06:24,767 --> 00:06:25,791 And Everytime We pass 182 00:06:26,047 --> 00:06:28,095 Inability upgrade into this car 183 00:06:28,607 --> 00:06:29,119 Scene 184 00:06:29,375 --> 00:06:30,399 It will just work 185 00:06:30,655 --> 00:06:31,167 So 186 00:06:31,423 --> 00:06:33,215 Separating logic from data is 187 00:06:33,471 --> 00:06:35,775 Also is a good idea especially when you're 188 00:06:36,031 --> 00:06:38,335 Dealing with a somewhat complex system 189 00:06:38,591 --> 00:06:43,199 Alright so let's go back to upgrade screen so I'm going to switch over to the tab and then click 190 00:06:43,455 --> 00:06:44,991 Into the scene 191 00:06:45,247 --> 00:06:47,551 Darko here so we don't actually have a square 192 00:06:47,807 --> 00:06:48,575 Two for the 193 00:06:48,831 --> 00:06:49,343 Read seen 194 00:06:49,599 --> 00:06:52,671 So let's go ahead and create once 195 00:06:53,183 --> 00:06:55,231 Click the script with the upgrade screen route 196 00:06:56,511 --> 00:06:57,279 And then click 197 00:06:58,047 --> 00:07:00,095 Will you define a function in here 198 00:07:00,351 --> 00:07:02,143 And what dysfunction needs to be in 199 00:07:03,423 --> 00:07:04,191 Ability 200 00:07:05,727 --> 00:07:07,519 And this is going to accept 201 00:07:07,775 --> 00:07:09,311 A parameter upgrades 202 00:07:09,567 --> 00:07:11,615 What is going to be of type array 203 00:07:12,127 --> 00:07:12,895 Ability 204 00:07:14,943 --> 00:07:15,967 And then Colin at the 205 00:07:16,991 --> 00:07:19,807 Let's do a pass just to make this work 206 00:07:20,319 --> 00:07:26,207 So basically saying we're going to pass on in a rear of the building upgrades to display on the upgrade screen 207 00:07:26,719 --> 00:07:31,071 Now what we need to do is we need to get a reference to that seen disability card 208 00:07:31,327 --> 00:07:32,351 Right so 209 00:07:32,607 --> 00:07:34,399 In our upgrade screen scratch 210 00:07:34,911 --> 00:07:37,215 Let's go ahead and create and export 211 00:07:39,007 --> 00:07:39,519 Upgrade 212 00:07:40,031 --> 00:07:40,543 Card 213 00:07:40,799 --> 00:07:41,567 Seemed 214 00:07:42,079 --> 00:07:44,127 And this is going to be of type packed scene 215 00:07:44,383 --> 00:07:45,663 And then we can 216 00:07:45,919 --> 00:07:46,431 Control 217 00:07:46,687 --> 00:07:47,199 In here 218 00:07:47,711 --> 00:07:49,247 So before we go any further 219 00:07:49,503 --> 00:07:51,295 I'm going to delete the ability card 220 00:07:51,551 --> 00:07:54,623 From my operate screen so attractive it to leave you so you can see 221 00:07:55,135 --> 00:07:58,463 I'm just going to leave this ability upgrade card because we Don't Need That Anymore 222 00:07:58,719 --> 00:08:02,559 And then I'm going to rename this each box container 2 card container 223 00:08:03,327 --> 00:08:08,703 And I'm going to Mark this with right click as unique name so go ahead and Mark that there 224 00:08:08,959 --> 00:08:11,775 Same as we did with the labels in the upgrade car 225 00:08:12,799 --> 00:08:14,847 Open up script back 226 00:08:15,359 --> 00:08:17,663 And we're going to go ahead and do an unread 227 00:08:20,223 --> 00:08:20,735 Bar 228 00:08:21,247 --> 00:08:22,271 Card container 229 00:08:22,783 --> 00:08:25,855 And then we can take that as an outbox container cos we know that type 230 00:08:26,111 --> 00:08:27,391 Is it going to dollar sign 231 00:08:27,647 --> 00:08:28,415 Percent 232 00:08:28,927 --> 00:08:29,951 Card contain 233 00:08:31,999 --> 00:08:32,511 Alright 234 00:08:32,767 --> 00:08:35,839 So now what are we going to do when we call set ability upgrades 235 00:08:36,095 --> 00:08:37,887 What we're going to do is we're going to say 236 00:08:38,143 --> 00:08:38,655 4 237 00:08:38,911 --> 00:08:39,679 Upgrade 238 00:08:39,935 --> 00:08:40,703 In 239 00:08:41,215 --> 00:08:41,983 Upgrades 240 00:08:42,751 --> 00:08:45,055 This is going to do is this is going to iterate 241 00:08:45,311 --> 00:08:47,871 Over every element in this upgrades array 242 00:08:48,127 --> 00:08:48,639 And 243 00:08:48,895 --> 00:08:49,407 Give us 244 00:08:49,919 --> 00:08:51,455 Each individual upgrade 245 00:08:51,711 --> 00:08:54,015 And what are we going to do with that while we're going to save our 246 00:08:54,271 --> 00:08:55,551 Card instant 247 00:08:55,807 --> 00:08:57,087 Is equal to 248 00:08:58,367 --> 00:08:59,391 Card scene 249 00:08:59,647 --> 00:09:00,159 Start 250 00:09:00,671 --> 00:09:01,439 Instantiate 251 00:09:01,951 --> 00:09:05,023 Going to grab an instance of the card seem that we have 252 00:09:05,791 --> 00:09:06,815 We are going to 253 00:09:07,071 --> 00:09:07,583 Say 254 00:09:07,839 --> 00:09:08,863 Card container 255 00:09:09,375 --> 00:09:10,655 And Child 256 00:09:12,703 --> 00:09:13,727 Card instance 257 00:09:15,263 --> 00:09:17,311 I never going to say card instead 258 00:09:17,823 --> 00:09:18,847 Dart set 259 00:09:19,103 --> 00:09:19,871 Ability 260 00:09:20,895 --> 00:09:22,175 FTSE 100 261 00:09:22,431 --> 00:09:23,199 Set ability 262 00:09:23,711 --> 00:09:26,015 So because Google doesn't know the type of this 263 00:09:26,271 --> 00:09:27,807 We're not getting our recommendation 264 00:09:28,319 --> 00:09:31,135 So card instant start set ability upgrades 265 00:09:31,391 --> 00:09:32,415 And then we're going to pass out 266 00:09:32,671 --> 00:09:33,183 The up 267 00:09:33,695 --> 00:09:34,207 There 268 00:09:34,463 --> 00:09:37,535 Just passing around this ability upgrade resource 269 00:09:37,791 --> 00:09:39,839 And we're creating a card for each 270 00:09:40,351 --> 00:09:41,631 Ability upgrades 271 00:09:41,887 --> 00:09:42,399 Into the 272 00:09:42,655 --> 00:09:43,167 Upgrade Sky 273 00:09:43,679 --> 00:09:48,287 Alright there's a lot of set up here and we're not quite done so let's go on to the next thing that we need to do 274 00:09:48,543 --> 00:09:52,127 Which is that we need to create this upgrade screen 275 00:09:52,639 --> 00:09:53,151 When 276 00:09:53,407 --> 00:09:54,175 There is a law 277 00:09:54,687 --> 00:09:56,735 Let's go back to our main scene 278 00:09:56,991 --> 00:09:58,271 Animes like the to Nemo 279 00:09:58,527 --> 00:10:00,063 Upgrade manager 280 00:10:00,345 --> 00:10:02,376 Subtitled by online-courses.club We compress knowledge for you! 281 00:10:02,377 --> 00:10:01,343 Needs to create 282 00:10:01,855 --> 00:10:03,647 The upgrade screen 283 00:10:03,903 --> 00:10:04,671 When 284 00:10:04,927 --> 00:10:10,303 We experience a level up so let's go ahead and open up this script for the upgrade manager 285 00:10:10,559 --> 00:10:13,119 Let's do another export variable at the top 286 00:10:13,631 --> 00:10:15,423 And we're going to say up to 287 00:10:15,679 --> 00:10:16,447 Screen 288 00:10:16,959 --> 00:10:17,471 Scene 289 00:10:17,983 --> 00:10:19,775 And we're going to take that as a packed scene 290 00:10:20,799 --> 00:10:21,311 Perfect 291 00:10:21,567 --> 00:10:23,359 And so this on level up now 292 00:10:23,615 --> 00:10:26,431 This is where the bulk of our work is going to come 293 00:10:26,943 --> 00:10:29,247 So what we're going to do is we're going to 294 00:10:29,503 --> 00:10:30,783 Take this code 295 00:10:32,063 --> 00:10:33,343 What's create a new function 296 00:10:33,599 --> 00:10:36,415 Apply underscore upgrade 297 00:10:37,183 --> 00:10:38,975 Win a taking an upgrade here 298 00:10:39,487 --> 00:10:41,023 As in ability upgrades 299 00:10:41,791 --> 00:10:43,071 And then we're going to piss what we 300 00:10:43,583 --> 00:10:46,911 So there's going to be some slight changes that we need to make hair so on level 301 00:10:47,167 --> 00:10:49,471 We're going to move the Chosen upgrade 302 00:10:49,983 --> 00:10:51,007 Out of 303 00:10:51,263 --> 00:10:54,847 This apply upgrade function in back.into.the on level 304 00:10:56,383 --> 00:10:56,895 Ok 305 00:10:57,151 --> 00:11:02,527 And then in here we have some errors this chosen upgrade no longer exist right so I'm going to highlight 306 00:11:02,783 --> 00:11:04,575 In my apply upgrade function 307 00:11:04,831 --> 00:11:07,391 Highlight chosen upgrade hit ctrl d 308 00:11:07,647 --> 00:11:11,999 Until I'm so I can all the Chosen upgrade variables in this function body 309 00:11:12,255 --> 00:11:15,839 And I'm just going to upgrade instead because that's what are variable is 310 00:11:16,607 --> 00:11:17,887 So Dad should 311 00:11:18,143 --> 00:11:18,911 Clear things up 312 00:11:19,423 --> 00:11:20,191 So I'll ever 313 00:11:20,703 --> 00:11:24,543 We actually going to have to choose a couple of upgrades but what does keep it as for now 314 00:11:24,799 --> 00:11:30,431 And then in here this is where we going to instantiate the upgrade screen so I'm going to save our 315 00:11:30,687 --> 00:11:31,455 Upgrade 316 00:11:31,711 --> 00:11:32,479 Scream 317 00:11:33,503 --> 00:11:34,783 Is equal to 318 00:11:35,039 --> 00:11:35,807 Upgrade 319 00:11:36,063 --> 00:11:36,575 Screen 320 00:11:36,831 --> 00:11:38,879 Scene.in stands 321 00:11:39,647 --> 00:11:43,999 Where is going to go ahead and add it as a child directly so bad child 322 00:11:44,255 --> 00:11:46,303 Upgrade screen instance 323 00:11:46,559 --> 00:11:49,375 And then we're going to say upgrade screen instance 324 00:11:49,631 --> 00:11:50,399 That's it 325 00:11:50,655 --> 00:11:51,679 Ability 326 00:11:51,935 --> 00:11:52,703 Upgrades 327 00:11:52,959 --> 00:11:53,983 And we're gonna send 328 00:11:54,239 --> 00:11:54,751 We're going 329 00:11:55,263 --> 00:11:57,567 To indicate that this is an array 330 00:11:57,823 --> 00:11:58,847 I'm going to pass out 331 00:11:59,103 --> 00:11:59,871 Chosen 332 00:12:00,383 --> 00:12:02,175 Sorting array with one element 333 00:12:02,943 --> 00:12:05,247 Now we can test and see if this works so 334 00:12:05,503 --> 00:12:09,599 We're not done yet but let's test and see if we work so if we do on level up 335 00:12:09,855 --> 00:12:12,927 What should happen is that we should instantiated the upgrades 336 00:12:13,183 --> 00:12:13,951 And 337 00:12:14,463 --> 00:12:17,535 One ability upgrade selected which is the sword 338 00:12:18,559 --> 00:12:19,583 The sword quick 339 00:12:20,095 --> 00:12:24,703 So before we Run the game let's go back door to my mum so I can see what everything's looking 340 00:12:25,215 --> 00:12:30,079 What's open up the upgrade managers seen the routine so not in the main 341 00:12:30,335 --> 00:12:31,359 But in the roots 342 00:12:31,615 --> 00:12:34,431 I'm going to change that exported upgrade 343 00:12:34,687 --> 00:12:35,711 Screen scene 344 00:12:36,223 --> 00:12:37,247 So I'm going to 345 00:12:37,503 --> 00:12:38,527 In my files 346 00:12:39,039 --> 00:12:40,831 Filter with the word upgrade 347 00:12:41,343 --> 00:12:46,207 I'm going to find my upgrade screen under the UI directory and just dragged that on over 348 00:12:46,463 --> 00:12:47,999 To my upgrade screen scene 349 00:12:48,255 --> 00:12:49,279 Export variable 350 00:12:50,559 --> 00:12:52,863 Alright then one final thing and I'm going to do 351 00:12:53,119 --> 00:12:54,911 Is I'm going to go open up my 352 00:12:55,167 --> 00:12:56,959 Experience manager script 353 00:12:57,215 --> 00:12:58,751 And this requires 354 00:12:59,263 --> 00:13:01,055 Target experience of 5 355 00:13:01,311 --> 00:13:03,359 I'm going to turn down this target experience 356 00:13:03,871 --> 00:13:04,639 21 357 00:13:04,895 --> 00:13:05,919 For the first level 358 00:13:06,175 --> 00:13:09,759 That way as soon as we collect one Vial we should be able to see something 359 00:13:10,271 --> 00:13:11,295 Something around the game 360 00:13:11,551 --> 00:13:13,343 And let's see what happens when I 361 00:13:15,135 --> 00:13:17,951 And you can also increase the drop rate of the vile if you were 362 00:13:18,207 --> 00:13:20,255 Be quicker ok so we've got a crash here 363 00:13:21,279 --> 00:13:27,423 Ok night crash is because of a type or so it just doesn't realise that this array is the same 364 00:13:27,679 --> 00:13:29,983 What were expecting inset ability upgrades 365 00:13:30,239 --> 00:13:31,775 So we can just right as 366 00:13:33,311 --> 00:13:33,823 And then 367 00:13:34,591 --> 00:13:35,615 In brackets 368 00:13:35,871 --> 00:13:36,639 Ability 369 00:13:36,895 --> 00:13:37,407 Upgrade 370 00:13:38,431 --> 00:13:39,455 So that will work 371 00:13:39,711 --> 00:13:44,831 The other option which I don't prefer but what you can do is just remove the typing entirely 372 00:13:45,087 --> 00:13:45,855 And 373 00:13:46,111 --> 00:13:47,135 You'll lose some 374 00:13:47,647 --> 00:13:49,695 Code suggestions in hinting 375 00:13:49,951 --> 00:13:50,975 But you won't have to worry 376 00:13:51,231 --> 00:13:51,999 These types being 377 00:13:52,511 --> 00:13:53,791 But I think this is ok for you 378 00:13:54,303 --> 00:13:56,095 And then there will be another crash too 379 00:13:56,351 --> 00:13:57,375 Which I'm realising 380 00:13:57,631 --> 00:14:00,959 Which is that we need to go or ability upgrade car 381 00:14:01,471 --> 00:14:03,263 Or sorry we need to go to upgrade 382 00:14:04,031 --> 00:14:10,175 And we need to supply a value for this upgrade cards in export so we never did that 383 00:14:10,431 --> 00:14:14,271 Oh that's pretty easy we can go to where you are if you still have upgrades 384 00:14:14,527 --> 00:14:15,551 In the file system 385 00:14:15,807 --> 00:14:18,623 You should just be able to drive over disability upgrade card 386 00:14:18,879 --> 00:14:19,647 Into that 387 00:14:19,903 --> 00:14:22,719 Internet export variable there and some now if you run the game 388 00:14:22,975 --> 00:14:24,767 Can you collect a vile 389 00:14:25,023 --> 00:14:26,303 Then everything 390 00:14:26,815 --> 00:14:27,327 Should 391 00:14:27,583 --> 00:14:28,095 Start 392 00:14:28,863 --> 00:14:29,887 Ok it's a look at that 393 00:14:30,143 --> 00:14:32,703 Someone to collect that you've got your sword quickness 394 00:14:32,959 --> 00:14:34,239 And then your description 395 00:14:34,495 --> 00:14:37,567 So that is working now it's not working is that the game 396 00:14:37,823 --> 00:14:39,871 Is still running in the background 397 00:14:40,127 --> 00:14:40,895 Which is not 398 00:14:41,407 --> 00:14:43,455 So what we want to do is we want to pause the 399 00:14:43,967 --> 00:14:47,551 And something for we can actually control the pause mode 400 00:14:47,807 --> 00:14:52,927 Various branches of the same tree so we can set some branches to pause and some branches do not pass 401 00:14:53,183 --> 00:14:57,791 This is going to be very easy so what we want to do is let's go into our upgrade 402 00:14:58,047 --> 00:14:58,559 Screen 403 00:14:58,815 --> 00:15:00,351 And in are ready method 404 00:15:00,607 --> 00:15:02,399 Select override the ready method 405 00:15:03,423 --> 00:15:04,959 Underscore Reading 406 00:15:05,727 --> 00:15:07,519 Are we going to do is there in a call get through 407 00:15:09,311 --> 00:15:10,079 Pause 408 00:15:10,591 --> 00:15:11,359 Is equal to 409 00:15:11,871 --> 00:15:18,015 True what does going to do if that's going to pass the rest of the game but you have to be careful just because this is also going to pause 410 00:15:18,271 --> 00:15:19,551 The current node the upgrades 411 00:15:20,063 --> 00:15:21,087 Other way around that 412 00:15:21,343 --> 00:15:22,879 Is that we are going to 413 00:15:23,135 --> 00:15:25,695 Scroll down on the upgrade screen in the inspector 414 00:15:25,951 --> 00:15:28,255 And we're going to change the process mode here 415 00:15:28,511 --> 00:15:29,791 To always 416 00:15:30,303 --> 00:15:32,351 What does it's going to say is this is going to say 417 00:15:32,607 --> 00:15:35,935 Always handle this node always process this note 418 00:15:36,191 --> 00:15:37,983 Even when the rest of the tree 419 00:15:38,239 --> 00:15:38,751 Is paused 420 00:15:39,007 --> 00:15:41,055 Cancel let's go ahead and Run the game again 421 00:15:42,335 --> 00:15:45,151 And now when you pick it up you can see that the game has been paused 422 00:15:45,407 --> 00:15:47,711 And we can still see our upgrade 423 00:15:48,223 --> 00:15:54,367 So the next step is to make it so that we can actually select our upgrade from the UI and Wilko 424 00:15:54,623 --> 00:15:55,903 That in the next lesson 27841

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.