Welcome back, my fellow game developers.
In this video, we are going to be
applying the changes that we've made.
Not only that, we are going to run
the game when we should impose,
you'll notice that even the bullet freezes and mathspace,
if we tried to walk around, nothing happens.
And if we try to shoot, also,
no bullets are produced.
So this is the actual parsing of the game,
not just having a menu.
So let's not waste any more time and let's get started.
Oh, case.
So even though we have the pause screen,
we can go back.
We can go to the main menu.
We are not actually pausing the game.
The game still running,
we can still run,
we can still jump.
We can do everything. Actually, we don't jump.
The enemy still attack us.
So we need to figure out a way
to actually freeze our gain.
And I'm not really feeling up to it.
So I'm going to present you with a challenge to stop
the whole word world with an l,
freeze the world using timescale.
So this is the only point and the challenge,
pretty easy, I think you know what to do.
So pause the video right now and go freeze the world.
Hey, welcome back.
I know you freaking hate
when I give you a challenge at the beginning of a video,
you're just sitting back.
Yeah, finally, I'm going to learn something
and then Michael just gives you a challenge.
Okay, anyways, in here,
once we pause the game and we will access the time,
a dot a delta time.
And it's going to be equal to no time that timescale 0,
F. And in here when we stop the boss,
the time dot timescale is equal to 1.5.
Save that back in our game.
Or we will make this a bit bigger, run the game.
So pause the game.
Excellent.
There is a problem though,
and that is nothing is showing up.
Not only that, but we are still being able
to wiggle the weapon.
And what happened in here?
Well, the problem is that our pause menu as being
handled or is appearing using the animation.
So what I'm going to do is I'm just going to
go into the animator in here.
And I'm just going to remove
the components so we don't have animations anymore.
So now when we run the game,
I paused the menu and everything stops.
But as you saw,
I can still move around with the enemy.
Not move around, but I can still
shoot and produce bullets. There you go.
You can see the stability and
I can produce some of those.
And this is not something that
we want when we resume the game,
everything is back to normal,
but this is not enough.
So what we're going to do is we'll
go into the where is he?
Player controller. So player,
the player controller.
So player controller.
And in here, if we scroll up the update,
we are going to go ahead and end here.
Say that if the level manager dot instance dot game
is paused as game paused.
So if it's true,
that means that we are going to simply return.
And remember what happens when we simply return,
we just avoid the whole object.
So if we get to this line,
will check it's paused, true.
Then we return and then we go back to the Update,
and then we go back to the update.
So the player does not do anything.
He cannot move, he cannot point the gun.
He cannot be animated,
know dashing off, switching gums, no, nothing.
So now back in our game,
when we run the gain,
we can now pause the game.
And you can see that our player no longer moves
even though we can still
produce a bullet for some reason.
Oh, that's because the actual shooting is on the
what's called the the weapons system.
So we resume the game, the boat flies off.
You can do this anywhere you want
inside of the update whenever you
have some kind of so whereas
the weapons system that we go in here, an update.
There we go. Now we will no
longer be able to fire bullets.
You can also add this to
the enemy controllers where they
also shoot us with moles.
So I guess this is the end of
the creating menus and our game.
I'm going to commit our changes.
We'll call this made the pause menu.
Actually balls.
Again.
Commit the changes. I hope you enjoy it.
Let's look at our masters.
As long as we have here, we still have time.
This video was very short.
I mean, look, look how much we have achieved together.
This gain is incredible.
It has so many things,
it has so many options,
so many variables, so many scripts,
so many folders as the folders that we have
are I don't know what her
almost at a 100 folders, I think.
Probably we have so much animations dislike.
Look at how many and we still didn't animate everything.
We still have a lot to do.
Can animate the enemies when they shoot,
there are still a lot of things that we can add.
So because this video is short,
I want you to take the time to pray,
then breathe out, and
appreciate how far you've
come in your game development journey.
And what an amazing review.
You just let me left me anyways.
Thank you so much for watching.
I really, really appreciate if you've got to this point.
If you did leave me a message
on the score, let's have a chat.
Tell the community how much you've come,
how much you've learned,
how much you have accomplished
and see you in the next one, I guess,
where we will be creating a boss fight,
I believe, which is like the coolest thing in the world.