All language subtitles for lesson075

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
ru Russian Download
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

So whenever you wanted to move this player in various

Directions maybe to left or to the right

What do we do that is actually with something called variables

Variables are declared or another way of putting it is there born or birth

Before the start of function

So let's come up with a variable called speed

Private

Float

Speed

Closet

Basically what we've done here is we've spoken into existence

A new variable and that variable is a float

Godspeed

You don't know the floor is that's ok I didn't know what a flow was either when I started scripting a flow is basically a decimal number

Integers which is 12345 and someone in this float switch is 1.2

Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1

554 2.33

You want to use floats for Speed because it's slowly going to maybe Accelerate from €100 to

So

Speed could technically be 5.654 or we can make this

That's a 1 point

34567

So that is our float for Speed

Don't worry about this word private will talk about private and public in just 2

First I want to talk about why you would use a variable

Change this five

Actually speed

So what is Speedwell speed is 1.3 4 5 6 7

So that means that are transformed position is going to move at the rate of 1

34567

Tell if we save

Going the Unity

Play

You see the speed is now moving at that rate

The reason you're gonna use variables because you want to be able to reuse them when you can or change them at

10 time

Self example what if in the start I said well actually want my speed to be

5.55

4

Now

Because this function is going to fire first

Once we hit the update function speed is now going to be equal to this

Save it down hip play

This is moving like faster

What are the cool things about variables that you can actually change them in the universe editor you actually have to write them

In a script to change them

Instead of doing that

Delete that

And we can actually do something called serialising a field so we can do serialise field

All that means is there any inspector now

You'll see the variable speed

Right here

Technically changed this year

2.01

It's going to override

What we declared here

That's cool because we have an enemy script

Using it multiple times across maybe doesn't have enemies

Maybe some enemies you want to move in a different way

Go ahead play

Moving very slowly can almost

Barely see it

And to change that variable at runtime

Where we go or what about going backwards

Here we go so that's the benefit of variables especially when they see realised

Now we can do is actually happy if we wanted to he copy this player

Multiple times

Chelsea unit control

How many could set each wind have different speeds of 1

5

-2

And then hit way

And so now I cannot take enemies patrolling

Through the scene

That's the benefit of having serialised Fields

My inspector here

That's a float

Does other kinds of variables as well

Is also bullying

Private bullion

Dead

A bullying is basically true or false

I'm like a float

True or false is either basically 1 or 0 and can be anything else one being true

False

Even what use the words true or false

Dead is going to be true or false

By default can be false

So would want to start a live so we're not dead which is private

And this would be health help would be an integer you either

10 9876543210

That's a good use of an integer help

Now you should be something like a coin there's you can't really have

3.5 pennies

In real life

You can either have three or four so that's the use of an integer

There's also

Strings

So I say what's my name

Well we could are call herself Billy

That is a string

The reason why there's a green zig zag line is because there's actually variables called name already

Inside of a monobehaviour

So we really don't want to use that cos I can get a little bit

So what we do player name

Here we go

Universe all of my variables are lowercase

All variables should be lowercase

Without spaces

You can use underscores if you like

But I tend to just you lowercase and then anytime is a new word

Abaqus scripting classes on the other hand or uppercase

In functions are uppercase as well

Definitely want to follow this rule especially going to be working with the team and just

Funny I'm working on a game long term

Switch it on for crazy and don't pick your team members go crazy

To keep your variables lowercase with uppercase anytime you have a new word in that variable

An app that starting a new function

Or

Naming a scrim

So again if we save these out you never said nothing is actually showing up in the inspector

Because remember

We need abuse the serializefield

Actually show them

Indeed inspector

Search back in inspector

Can you see they're all here

Set Dead true everyone

The more we play

We have the health set to 10

Maybe for some players

I characters we can do the health and safety and maybe his name is

Jack

And

Sammy

With the help of 25

Now let's talk about what private means

A private variable is basically something that only going to be accessed by this script

What about a script called enemy

Well if enemy wanted to let say

Set Dead to false

Or Set Dead 2 true for the player I couldn't actually do it

Because it said the private

This variable dead in this very bad health and the name the speed only

This class can adjust these variables

Apollo variable

Actually means that any script

Any script inside of Unity

Whether the enemy script or a weapon script or a bullet straight or anything

Access this variable in change it

No call thing about public variables if you don't actually need to serialise them because hey the public say

Even unity the editor is going to have access to that

So even though we don't have serialise written here before the speed variable

United States still there

But the moment we make it private

Disappear

Basically

Every variable by default should always be private you should only said at the pub

If you know for certain that you need to access that variable

From a different script we're going to be creating an entire prototype and we're going to using private and public variables

Don't worry if this doesn't make sense just yet

So getting the recap we have floats which are decimal numbers speed is a good way of using a float

We all have brilliant which are true and false

Remembering integer is single number 01234 basically digits

And then finally strings which are actual names and they always appear inside

Quote

And then a word

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