All language subtitles for 25. Timer

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
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
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Now we want to add some kind of a game mechanic to this, so game mechanics are almost like the rules

or the gameplay element that makes it addictive and makes it kind of fun and interactive.

And in this one where we're going to add a timer, so you get maybe 30 seconds and you have to survive

for 30 seconds against an endless loop of enemies.

And if you manage to make it to 30 seconds, then it will load the next level.

OK, and the whole idea behind this game is you've got to see how many levels you can achieve.

It's almost like Tetris.

You know, in Tetris, it keeps getting faster and faster and faster each level you go up.

So you just see how long you can survive.

Now, that's kind of the idea that I want to put into this game.

So, first of all, we need some kind of text at the top, and this is going to be on that canvas.

So I'm going to right click UI.

And that some text now probably be somewhere in the center of the screen and really odd to see.

So I'm just going to change the color to white.

And I'm going to change the size to maybe about 80.

And then I'm just going to move this up.

There it is.

Just click and drag on the Y.

And then I'm going to click on the alignment center so I can get it centered on the screen.

And this is just goodness.

Let's say that we give around 30 seconds.

Yeah, my font style might actually make that bold, just so it stands out a little bit more.

OK.

And we're going to be controlling this text through code.

So I'll just rename this time of text.

So now in our script, in the main script, we're going to

leave ourselves and a comment, so I'll call a timer.

And first of all, we need a public offsite text or call timer, then a public integer.

I'm going to call level time limit.

And to make that equal, about 30 and then a private integer we'll call level current time.

Keep, keep, keep a record of exactly how many seconds have passed by.

And now this is one of the reasons why we've got this time countdown.

Instead of doing this every frame, we know that we only want the time to go down each and every second.

So we're using a one second coroutine or a one second pulse that avoids overloading our update method

and with unnecessary commands.

OK, so we can use our time countdown where we have time.

Countdown to his start in the coroutine time delay.

OK, well, we actually want to make sure that only happens as long as time is greater than zero.

So we can say if the level of time is greater than zero.

And run this custom function.

OK.

However, we do also need to ensure that we're taking time off.

Current time.

So we're going to stay level current time minus equals one each time this runs, and this runs once

per second.

And then we also need to update our text as well.

So I'm going to say timer.

So text lowercase equals level current time.

OK.

And if I leave it at that.

Notice that I get this red squiggle.

So you cannot implicitly convert time integer to string.

All right.

String this basically just text.

So we do dot to string.

And that will then convert it, OK, into an into actual text.

Now we need to essentially say if.

Level current time

is less than or equal to zero.

Not not case for now.

We're just going to pause the game to make sure it works.

So when you say time, double time scale.

Equals zero.

OK, and that will effectively just pause the game.

So let's save this.

Wait for that to compile.

And then, you know, our main script, we should now have a time, a text, let's drag in that time

a text.

There we go.

And we know that we're running on about 30.

So let's just try this and make sure that that time is actually going down.

OK.

And now and at the moment, it pulls the game for some reason.

Let me see if Lovel caught on tape.

OK, what is.

Second, wait a second.

Yeah, I need to make in the start.

I need to make my level current time equal my level time limit.

That's what I've not done.

Level current time start to zero.

OK.

So in the stop and say level, current time equals level time limits.

There we go.

So that will pass that throw through to that current time.

Now, if you wanted, for example, to 60 or 90 or whatever you want, you can do so in the ed, and

it will automatically pass it through to the level Covid time.

So save that and then let's try it again.

Well, we know it just pulls the game zero.

So that's good.

OK, instantly, there we go, and time is now going down each and every second.

OK, excellent.

And so what we'll do in the next video is we'll set it up so that when it reaches zero and it can actually

load the next level.

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