All language subtitles for 20. Creating an Experience Bar

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:02,816 Let's Begin the work that we need to do 2 00:00:03,072 --> 00:00:06,144 To enable the player to upgrade 3 00:00:06,400 --> 00:00:06,912 Skills 4 00:00:07,424 --> 00:00:13,568 So in vampire survivors another games what you typically have is an experienced bar that one 5 00:00:13,824 --> 00:00:14,848 Fills up 6 00:00:15,104 --> 00:00:16,896 You will be able to upgrade 7 00:00:17,152 --> 00:00:19,200 Something some ability that you have 8 00:00:19,456 --> 00:00:22,016 And the upgrade can take the form of 9 00:00:22,272 --> 00:00:23,040 Ada 10 00:00:23,296 --> 00:00:26,112 The improvement to an existing ability or 11 00:00:26,368 --> 00:00:28,928 You can take the form of a brand new build 12 00:00:29,440 --> 00:00:32,768 And so that's all we can be working on is the experience bar 13 00:00:33,280 --> 00:00:36,352 Stop let's go ahead and see how that's going to look 14 00:00:36,608 --> 00:00:39,168 So first let's create a new scene 15 00:00:39,424 --> 00:00:40,960 With a type of 16 00:00:41,216 --> 00:00:43,008 Canvas layer as the route 17 00:00:43,776 --> 00:00:44,544 Let's call this 18 00:00:45,056 --> 00:00:45,568 Experian 19 00:00:45,824 --> 00:00:46,336 Bar 20 00:00:46,848 --> 00:00:48,640 Let's go ahead and save it in 21 00:00:48,896 --> 00:00:49,408 Seems 22 00:00:49,920 --> 00:00:50,432 UI 23 00:00:52,736 --> 00:00:56,064 Went bad as a child note in margin contain 24 00:00:56,576 --> 00:00:57,088 And then 25 00:00:57,344 --> 00:00:58,624 Click the anchor 26 00:00:58,880 --> 00:00:59,904 Button appear 27 00:01:00,123 --> 00:01:02,363 Subtitled by online-courses.club We compress knowledge for you! 28 00:01:02,364 --> 00:01:01,184 In the towbar 29 00:01:01,440 --> 00:01:04,768 And then select the full rectangle option in the bottom right 30 00:01:05,024 --> 00:01:07,328 Ok and before we go any further with this 31 00:01:07,584 --> 00:01:10,400 Go ahead and scroll down on your margin container 32 00:01:10,656 --> 00:01:11,936 Until you see 33 00:01:12,192 --> 00:01:13,728 The mouse filter option 34 00:01:13,984 --> 00:01:15,520 And change that to ignore 35 00:01:15,776 --> 00:01:17,824 And remember we're doing this for the mouse 36 00:01:18,080 --> 00:01:19,616 Events are not interested 37 00:01:20,896 --> 00:01:21,408 4 square 38 00:01:21,664 --> 00:01:22,176 Margin 39 00:01:22,688 --> 00:01:26,016 Under the margin container let's go ahead and add a child no 40 00:01:26,272 --> 00:01:27,040 Progress bar 41 00:01:28,832 --> 00:01:30,624 And will end up with something like this 42 00:01:31,136 --> 00:01:35,488 In the progress bar within a scroll down and we're going to change the horizontal and vertical 43 00:01:35,744 --> 00:01:36,512 Sizing 44 00:01:36,768 --> 00:01:37,280 2 45 00:01:37,536 --> 00:01:40,864 Keep fill in the horizontal and working to shrink and 46 00:01:41,120 --> 00:01:41,888 In the 47 00:01:42,144 --> 00:01:43,936 So now we've got our bar exist 48 00:01:44,192 --> 00:01:44,704 At the bottom 49 00:01:44,960 --> 00:01:49,056 Now before we go any further we're going to also change the mouse filter for this bar 50 00:01:49,312 --> 00:01:54,944 So scroll to the mouse filter setting every control note has a mouse filter setting 51 00:01:55,968 --> 00:01:57,248 And I'm just going to go ahead 52 00:01:57,504 --> 00:01:58,528 Ignore 53 00:01:58,784 --> 00:02:01,856 Describe to the top of the inspector for this progress bar 54 00:02:02,112 --> 00:02:03,648 What's turn off show present 55 00:02:03,904 --> 00:02:05,696 And that won't shrink It dramatic 56 00:02:05,952 --> 00:02:11,840 Also going to change the min value in the Maxwell rehearsal this to the mean value of 0 max value of 1 57 00:02:12,352 --> 00:02:13,888 We can leave the step at 58 00:02:14,144 --> 00:02:14,912 01 59 00:02:15,168 --> 00:02:18,240 Let's turn the volume to .5 just so we can see what we doing 60 00:02:18,752 --> 00:02:23,616 So what we do socially done as we've changed the range of the progress bar from 0 to 1 61 00:02:24,128 --> 00:02:25,408 So that we can work easily 62 00:02:25,664 --> 00:02:27,968 Set the value as a percentage 63 00:02:28,224 --> 00:02:30,784 Rather than some arbitrary number above 1 64 00:02:31,040 --> 00:02:33,344 We don't need to touch any of the other settings 65 00:02:33,600 --> 00:02:36,160 But I am going to do as I'm going to go down to the layouts 66 00:02:36,672 --> 00:02:42,304 And where it says custom minimum size I'm going to bump up the minimum size in the Y to 67 00:02:42,816 --> 00:02:45,120 Just to make it a little bit more 68 00:02:45,632 --> 00:02:47,424 Let's go over to our main 69 00:02:47,936 --> 00:02:50,240 Unless instantiate a child scene 70 00:02:50,496 --> 00:02:52,288 Are we going to instantiate that Xperia 71 00:02:52,800 --> 00:02:54,336 I'm going to drag the experience bar 72 00:02:54,848 --> 00:02:56,640 To just below the arena time you out 73 00:02:56,896 --> 00:02:58,432 And I'm going to run the game 74 00:02:59,200 --> 00:03:02,784 Security now that we've got a progress bar at the bottom of our school 75 00:03:03,296 --> 00:03:06,112 Now we are going to be doing a lot of you 76 00:03:06,368 --> 00:03:07,648 Steaming in this course 77 00:03:07,904 --> 00:03:11,232 We're not going to touch it right now so if it looks a little bit ugly 78 00:03:11,488 --> 00:03:12,256 As a matter of fact 79 00:03:12,512 --> 00:03:14,560 Anything in the game little bit ugly right now 80 00:03:14,816 --> 00:03:15,584 Don't worry 81 00:03:15,840 --> 00:03:19,168 We are going to be punching everything out but we got to build the foundation 82 00:03:19,424 --> 00:03:23,264 First if you have any doubts about what this game is going to look like when it's fine 83 00:03:23,520 --> 00:03:24,800 You can revisit 84 00:03:25,056 --> 00:03:27,360 The preview video that I made for this 85 00:03:27,616 --> 00:03:28,640 To see what the final 86 00:03:28,896 --> 00:03:29,408 It's going to look like 87 00:03:29,664 --> 00:03:31,712 It was that note out of the way 88 00:03:31,968 --> 00:03:34,272 It looks like a progress bar is displaying properly 89 00:03:34,784 --> 00:03:36,576 So now we have the challenge of 90 00:03:37,088 --> 00:03:40,672 Keeping the experience bar in sync with the amount of collected vile 91 00:03:40,928 --> 00:03:42,976 So let's go to experience manager 92 00:03:43,232 --> 00:03:44,256 And click 93 00:03:44,512 --> 00:03:45,536 Button to open it 94 00:03:45,792 --> 00:03:47,328 So we don't need a couple of things right 95 00:03:47,584 --> 00:03:49,632 Let's create a new variable called current lever 96 00:03:50,400 --> 00:03:51,680 21 97 00:03:52,704 --> 00:03:54,496 And another variable 98 00:03:54,752 --> 00:03:56,032 Here we're going to call it 99 00:03:57,056 --> 00:03:57,568 Target 100 00:03:57,824 --> 00:03:58,336 Experience 101 00:03:58,848 --> 00:04:00,896 I said this to let SE5 102 00:04:01,152 --> 00:04:01,664 To start off 103 00:04:01,920 --> 00:04:05,760 So we are already connected to the vile collected signal 104 00:04:06,016 --> 00:04:09,600 In the game events remember when we created that and we are already printing the car 105 00:04:09,856 --> 00:04:10,624 Experience here 106 00:04:10,880 --> 00:04:14,464 So what we're going to do is really need to find a new signal in this experience manner 107 00:04:14,976 --> 00:04:16,000 So we're going to say signal 108 00:04:16,512 --> 00:04:18,047 Experience 109 00:04:18,559 --> 00:04:19,071 Collect 110 00:04:19,839 --> 00:04:22,655 And then we're going to arguments were going to say 111 00:04:23,679 --> 00:04:24,959 Current Xperia 112 00:04:25,983 --> 00:04:26,495 Number 113 00:04:27,775 --> 00:04:28,287 Cloud 114 00:04:28,543 --> 00:04:29,055 And then 115 00:04:29,567 --> 00:04:30,335 Target Xperia 116 00:04:31,871 --> 00:04:32,383 Lotus 117 00:04:33,151 --> 00:04:37,503 So we're going to pass in the numbers that are necessary to calculate the progress 118 00:04:38,271 --> 00:04:38,783 Which is essential 119 00:04:39,039 --> 00:04:39,807 What was saying 120 00:04:40,063 --> 00:04:44,415 Analyst let's change this from experience collect and to experience updating 121 00:04:44,927 --> 00:04:46,719 Because that's going to be a little bit more 122 00:04:47,231 --> 00:04:47,743 Xperia 123 00:04:47,999 --> 00:04:48,511 Update 124 00:04:48,767 --> 00:04:49,279 Ok 125 00:04:49,535 --> 00:04:52,863 So in here we've got a current experience plus equals none 126 00:04:53,119 --> 00:04:54,399 What we're going to do 127 00:04:54,655 --> 00:04:55,935 Is we are going to do a cup 128 00:04:56,703 --> 00:04:59,519 Firstly we need to clamp the current experience 129 00:05:00,031 --> 00:05:01,311 So what we're going to do 130 00:05:01,567 --> 00:05:02,591 Is we're going to say 131 00:05:02,847 --> 00:05:04,639 Current experiences equal to 132 00:05:05,663 --> 00:05:06,431 Minimum 133 00:05:07,711 --> 00:05:08,223 Current 134 00:05:08,479 --> 00:05:10,271 Experience Plus number 135 00:05:10,527 --> 00:05:11,039 Target 136 00:05:13,343 --> 00:05:14,623 That is going to do 137 00:05:14,879 --> 00:05:17,439 Is that is going to basically say 138 00:05:17,695 --> 00:05:19,231 Take the minimum of these to Val 139 00:05:19,999 --> 00:05:23,839 So if we end up going over the target experience when we are 140 00:05:24,095 --> 00:05:25,375 The number coming in 141 00:05:25,631 --> 00:05:26,911 Then it's going to claim 142 00:05:27,167 --> 00:05:30,751 To target experience because that will be the minimum number of the wise I would just use 143 00:05:31,263 --> 00:05:31,775 Ok 144 00:05:32,031 --> 00:05:34,335 Are we going to get rid of print statement as we don't need any 145 00:05:34,591 --> 00:05:35,871 What's a method signal 146 00:05:36,127 --> 00:05:37,407 Experience update 147 00:05:38,431 --> 00:05:38,943 Omit 148 00:05:39,199 --> 00:05:41,247 And we're going to pass in as the first argument 149 00:05:41,503 --> 00:05:42,271 Current 150 00:05:42,783 --> 00:05:44,063 And then as the second argument 151 00:05:46,367 --> 00:05:48,159 I never want to do is say yes 152 00:05:48,671 --> 00:05:50,975 Current experience is equal to 153 00:05:51,487 --> 00:05:52,255 Target explained 154 00:05:53,535 --> 00:05:55,839 Going to do is we're going to say current level 155 00:05:58,655 --> 00:06:01,215 Organ instrument that by 1 so plus equals 1 156 00:06:01,471 --> 00:06:03,007 We're going to say target Xperia 157 00:06:03,775 --> 00:06:04,799 Plus equals 158 00:06:05,055 --> 00:06:07,615 And this is where we're going to have to play with the numbers a little bit 159 00:06:07,871 --> 00:06:09,663 But for now let's create a const 160 00:06:09,919 --> 00:06:11,199 Just below the signal 161 00:06:11,711 --> 00:06:12,223 Can't 162 00:06:12,735 --> 00:06:13,247 Target 163 00:06:13,503 --> 00:06:14,527 Experience 164 00:06:14,783 --> 00:06:15,295 Grow 165 00:06:15,807 --> 00:06:17,087 And I will send that to 5 166 00:06:18,623 --> 00:06:19,135 So 167 00:06:19,391 --> 00:06:22,207 When are current experiences equal territorial 168 00:06:22,719 --> 00:06:23,743 We're going to 169 00:06:23,999 --> 00:06:25,279 Increment the current level 170 00:06:25,535 --> 00:06:27,327 Target Xperia 171 00:06:27,583 --> 00:06:28,095 2 172 00:06:28,351 --> 00:06:32,191 The current target experience plus the target experience grocery 173 00:06:32,447 --> 00:06:37,311 5 experience requirement per level a general probably going to change this butler just build it out 174 00:06:37,567 --> 00:06:39,103 Very roughly for now 175 00:06:39,359 --> 00:06:41,919 And then we need a set the current experience 20 176 00:06:42,431 --> 00:06:43,711 So that we reset the bar 177 00:06:43,967 --> 00:06:47,807 And I'm also going to admit this experience updated 178 00:06:51,135 --> 00:06:51,647 Again 179 00:06:52,159 --> 00:06:55,487 Just so that way you know you don't have to worry about a meeting things to offer 180 00:06:55,743 --> 00:06:58,047 Just emit the signal whenever it's a pro 181 00:06:58,303 --> 00:07:00,351 To do anything else hand 182 00:07:00,607 --> 00:07:03,423 Ok so this is essentially going to be our game live for 183 00:07:03,679 --> 00:07:05,471 Incrementing a level and 184 00:07:05,727 --> 00:07:07,775 Keeping track of the experience and all 185 00:07:08,031 --> 00:07:08,543 Good stuff 186 00:07:09,567 --> 00:07:11,871 So that should be good for experience manager 187 00:07:12,127 --> 00:07:15,711 Let's go to our experience bar that's open up that script 188 00:07:15,967 --> 00:07:19,807 All at Sea again and then attach a script to the experience bar 189 00:07:20,063 --> 00:07:22,111 Defaults are ok so that's all good 190 00:07:22,367 --> 00:07:24,159 Alright so let's do another explore 191 00:07:24,671 --> 00:07:25,951 Export variable 192 00:07:26,207 --> 00:07:27,231 Experience 193 00:07:27,743 --> 00:07:28,255 Manager 194 00:07:29,023 --> 00:07:29,791 As a note 195 00:07:30,047 --> 00:07:30,559 Ok 196 00:07:31,071 --> 00:07:33,375 And then what we're going to do is in our ready method 197 00:07:33,631 --> 00:07:35,167 Funk underscore ready 198 00:07:35,935 --> 00:07:37,727 We're going to say experience manager 199 00:07:37,983 --> 00:07:38,495 Start 200 00:07:38,751 --> 00:07:43,103 And an Arsenal is called what so if I go to my experience manager scriptwriter 201 00:07:43,615 --> 00:07:45,919 Experience updating so I'm just going to copy that 202 00:07:46,175 --> 00:07:47,199 And then come back to the sky 203 00:07:47,711 --> 00:07:50,271 Experience manager experience updated 204 00:07:51,039 --> 00:07:51,807 On 205 00:07:52,063 --> 00:07:52,575 Experian 206 00:07:52,831 --> 00:07:55,391 Updated so again were using the signal 207 00:07:55,647 --> 00:07:57,951 From the supplied experience manager 208 00:07:58,463 --> 00:08:04,607 To figure out how to connect to a sunstead of trying to go through the scene tree and find it we're just supplying 209 00:08:04,863 --> 00:08:06,143 Is an export variable 210 00:08:06,399 --> 00:08:07,167 Another connector 211 00:08:07,423 --> 00:08:07,935 2 212 00:08:08,191 --> 00:08:08,703 This 213 00:08:08,959 --> 00:08:09,983 On experience 214 00:08:11,007 --> 00:08:12,031 And then we need to 215 00:08:12,287 --> 00:08:13,823 Create that function so on 216 00:08:14,079 --> 00:08:14,591 Experience 217 00:08:16,127 --> 00:08:18,431 And remember we've got two arguments coming in 218 00:08:18,687 --> 00:08:19,967 You've got the curry 219 00:08:20,223 --> 00:08:20,991 Xperia 220 00:08:22,015 --> 00:08:22,783 Which is a flower 221 00:08:23,039 --> 00:08:24,319 And the target 222 00:08:25,087 --> 00:08:25,599 What does a 223 00:08:26,111 --> 00:08:27,903 What's this right pass for now 224 00:08:28,159 --> 00:08:34,303 And we need to get the progress bar now remember I showed you the trick of how we can do access as unique 225 00:08:34,815 --> 00:08:37,887 But I'm not going to do that this time just to show you what it looks like 226 00:08:38,655 --> 00:08:41,471 So I'm going to underneath the export I'm going to do it 227 00:08:41,727 --> 00:08:42,495 On read 228 00:08:43,519 --> 00:08:44,031 Bar 229 00:08:44,287 --> 00:08:47,615 Progress underscore bar is equal to dollar sign 230 00:08:47,871 --> 00:08:48,895 Margin container 231 00:08:49,151 --> 00:08:49,663 Flash 232 00:08:50,943 --> 00:08:52,991 So we're going to get a reference to the progress bar 233 00:08:53,247 --> 00:08:54,015 On ready 234 00:08:54,271 --> 00:08:59,647 And I'm here we're going to update the progress bar so let's get rid of this pass in on experience update 235 00:08:59,903 --> 00:09:02,719 Let's calculate the percentage so far percent 236 00:09:03,743 --> 00:09:04,511 Is equal to 237 00:09:05,023 --> 00:09:05,791 Credit Xperia 238 00:09:06,303 --> 00:09:07,583 Divide by 30 239 00:09:08,095 --> 00:09:13,727 Now if you wanted to you could put in a check to make sure that they start experience is not zero 240 00:09:13,983 --> 00:09:16,543 I'm not going to go that far I'm not going to be that careful 241 00:09:16,799 --> 00:09:21,151 But that is something that you could do if you wanted to be really defensive about European Pro 242 00:09:21,919 --> 00:09:22,687 And then we're going to say 243 00:09:22,943 --> 00:09:23,967 Progress bar 244 00:09:24,223 --> 00:09:25,247 Chad Valley 245 00:09:25,503 --> 00:09:26,783 Is equal to 246 00:09:27,295 --> 00:09:28,831 So this is going to work so 247 00:09:29,087 --> 00:09:30,879 Keep in mind progressbar 248 00:09:31,135 --> 00:09:33,439 The value is not by default 249 00:09:34,463 --> 00:09:39,583 It's right you recall that in a progress bar we change the min value and market value from 0 to 1 250 00:09:39,839 --> 00:09:42,399 If this was 0 to 100 like it is by The Fall 251 00:09:42,911 --> 00:09:44,703 If we set the value to a percentage 252 00:09:44,959 --> 00:09:47,775 We be sitting about like .5 out of 100 253 00:09:48,031 --> 00:09:49,823 Right Insula wouldn't even shower 254 00:09:50,335 --> 00:09:52,895 But because we're just at the Maine Valley in the max value 255 00:09:53,407 --> 00:09:54,175 2 256 00:09:54,431 --> 00:09:55,199 In one 257 00:09:55,455 --> 00:09:57,759 Now we have the ability to 258 00:09:58,015 --> 00:10:00,716 Just supply the calculator percentages the Valley 259 00:10:00,717 --> 00:10:02,889 Subtitled by online-courses.club We compress knowledge for you! 260 00:10:02,889 --> 00:10:05,951 And last thing I'm going to do on ready above the signal connection as I'm just simply going to see 261 00:10:06,207 --> 00:10:07,999 The progressbar.js value 262 00:10:09,791 --> 00:10:10,303 To start 263 00:10:10,559 --> 00:10:12,351 Because we have it set to .5 264 00:10:12,607 --> 00:10:13,375 In the 265 00:10:13,631 --> 00:10:14,399 So that we can see 266 00:10:14,911 --> 00:10:15,679 So so 267 00:10:15,935 --> 00:10:16,447 I can see that 268 00:10:16,703 --> 00:10:17,215 Work 269 00:10:17,727 --> 00:10:20,287 And just resetting it to zero when the game start 270 00:10:20,799 --> 00:10:21,823 So that we don't have 271 00:10:22,079 --> 00:10:22,847 Outdated 272 00:10:23,359 --> 00:10:23,871 Experience 273 00:10:24,383 --> 00:10:25,919 Something to go back to my main screen 274 00:10:26,175 --> 00:10:31,039 And we need to assign the experience manager in our experience Barroso at the experience bar 275 00:10:31,295 --> 00:10:32,831 Gravity experience manager 276 00:10:33,087 --> 00:10:34,623 And bring it on over 277 00:10:34,879 --> 00:10:37,439 Alright let's see if this is working so let's go ahead and Run the game 278 00:10:37,695 --> 00:10:39,999 And you can see that are bars not filled at the bottom 279 00:10:40,255 --> 00:10:41,535 And as I 280 00:10:42,047 --> 00:10:43,327 Kill some rats here 281 00:10:43,583 --> 00:10:44,351 We should 282 00:10:44,863 --> 00:10:46,399 Start seeing a private bar 283 00:10:48,959 --> 00:10:50,751 There we go I've collected one Vial 284 00:10:51,007 --> 00:10:53,567 So you're private bar should be increasing 285 00:10:53,823 --> 00:10:55,359 And we can just test real 286 00:10:55,615 --> 00:10:56,127 That 287 00:10:56,383 --> 00:10:58,175 If I collect one more vile 288 00:10:58,431 --> 00:11:00,479 That is going to rap and then 289 00:11:00,735 --> 00:11:01,759 Yep ok 290 00:11:02,015 --> 00:11:04,063 It looks like we're working well 291 00:11:04,575 --> 00:11:07,391 So that's the experience bar and experience 292 00:11:07,647 --> 00:11:08,415 Tracking 293 00:11:08,671 --> 00:11:12,511 The next step is to start creating a framework in 294 00:11:12,767 --> 00:11:14,303 Which weekend do ability 19807

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