1
00:00:00,000 --> 00:00:03,150
Welcome back, my fellow game developers.

2
00:00:03,150 --> 00:00:05,270
In this video, we are going to be

3
00:00:05,265 --> 00:00:07,685
applying the changes that we've made.

4
00:00:07,680 --> 00:00:09,540
Not only that, we are going to run

5
00:00:09,540 --> 00:00:11,720
the game when we should impose,

6
00:00:11,715 --> 00:00:15,355
you'll notice that even the bullet freezes and mathspace,

7
00:00:15,359 --> 00:00:17,809
if we tried to walk around, nothing happens.

8
00:00:17,805 --> 00:00:19,655
And if we try to shoot, also,

9
00:00:19,650 --> 00:00:21,570
no bullets are produced.

10
00:00:21,570 --> 00:00:24,840
So this is the actual parsing of the game,

11
00:00:24,840 --> 00:00:26,570
not just having a menu.

12
00:00:26,565 --> 00:00:31,505
So let's not waste any more time and let's get started.

13
00:00:31,500 --> 00:00:33,330
Oh, case.

14
00:00:33,330 --> 00:00:37,050
So even though we have the pause screen,

15
00:00:37,050 --> 00:00:38,810
we can go back.

16
00:00:38,805 --> 00:00:40,715
We can go to the main menu.

17
00:00:40,710 --> 00:00:43,630
We are not actually pausing the game.

18
00:00:43,625 --> 00:00:45,145
The game still running,

19
00:00:45,140 --> 00:00:46,400
we can still run,

20
00:00:46,400 --> 00:00:47,540
we can still jump.

21
00:00:47,540 --> 00:00:50,140
We can do everything. Actually, we don't jump.

22
00:00:50,135 --> 00:00:51,955
The enemy still attack us.

23
00:00:51,950 --> 00:00:54,790
So we need to figure out a way

24
00:00:54,785 --> 00:00:58,495
to actually freeze our gain.

25
00:00:58,490 --> 00:01:01,730
And I'm not really feeling up to it.

26
00:01:01,730 --> 00:01:05,660
So I'm going to present you with a challenge to stop

27
00:01:05,660 --> 00:01:10,940
the whole word world with an l,

28
00:01:10,940 --> 00:01:14,570
freeze the world using timescale.

29
00:01:14,569 --> 00:01:16,989
So this is the only point and the challenge,

30
00:01:16,985 --> 00:01:19,615
pretty easy, I think you know what to do.

31
00:01:19,610 --> 00:01:23,800
So pause the video right now and go freeze the world.

32
00:01:23,795 --> 00:01:26,015
Hey, welcome back.

33
00:01:26,015 --> 00:01:28,675
I know you freaking hate

34
00:01:28,670 --> 00:01:31,540
when I give you a challenge at the beginning of a video,

35
00:01:31,535 --> 00:01:32,855
you're just sitting back.

36
00:01:32,855 --> 00:01:35,095
Yeah, finally, I'm going to learn something

37
00:01:35,090 --> 00:01:37,510
and then Michael just gives you a challenge.

38
00:01:37,505 --> 00:01:39,805
Okay, anyways, in here,

39
00:01:39,800 --> 00:01:44,450
once we pause the game and we will access the time,

40
00:01:44,450 --> 00:01:47,050
a dot a delta time.

41
00:01:47,045 --> 00:01:54,625
And it's going to be equal to no time that timescale 0,

42
00:01:54,620 --> 00:02:00,290
F. And in here when we stop the boss,

43
00:02:00,290 --> 00:02:06,200
the time dot timescale is equal to 1.5.

44
00:02:06,200 --> 00:02:08,620
Save that back in our game.

45
00:02:08,615 --> 00:02:15,305
Or we will make this a bit bigger, run the game.

46
00:02:15,670 --> 00:02:17,920
So pause the game.

47
00:02:17,915 --> 00:02:18,985
Excellent.

48
00:02:18,980 --> 00:02:21,230
There is a problem though,

49
00:02:21,230 --> 00:02:23,620
and that is nothing is showing up.

50
00:02:23,615 --> 00:02:26,635
Not only that, but we are still being able

51
00:02:26,630 --> 00:02:29,920
to wiggle the weapon.

52
00:02:29,915 --> 00:02:31,825
And what happened in here?

53
00:02:31,820 --> 00:02:35,990
Well, the problem is that our pause menu as being

54
00:02:35,990 --> 00:02:40,890
handled or is appearing using the animation.

55
00:02:40,894 --> 00:02:43,134
So what I'm going to do is I'm just going to

56
00:02:43,130 --> 00:02:45,670
go into the animator in here.

57
00:02:45,665 --> 00:02:47,125
And I'm just going to remove

58
00:02:47,120 --> 00:02:49,670
the components so we don't have animations anymore.

59
00:02:49,670 --> 00:02:51,790
So now when we run the game,

60
00:02:51,785 --> 00:02:54,935
I paused the menu and everything stops.

61
00:02:54,935 --> 00:02:56,165
But as you saw,

62
00:02:56,165 --> 00:02:58,105
I can still move around with the enemy.

63
00:02:58,100 --> 00:02:59,960
Not move around, but I can still

64
00:02:59,960 --> 00:03:02,120
shoot and produce bullets. There you go.

65
00:03:02,120 --> 00:03:04,130
You can see the stability and

66
00:03:04,130 --> 00:03:06,290
I can produce some of those.

67
00:03:06,290 --> 00:03:07,760
And this is not something that

68
00:03:07,760 --> 00:03:09,220
we want when we resume the game,

69
00:03:09,215 --> 00:03:10,765
everything is back to normal,

70
00:03:10,760 --> 00:03:12,590
but this is not enough.

71
00:03:12,590 --> 00:03:15,290
So what we're going to do is we'll

72
00:03:15,290 --> 00:03:18,490
go into the where is he?

73
00:03:18,485 --> 00:03:21,955
Player controller. So player,

74
00:03:21,950 --> 00:03:23,720
the player controller.

75
00:03:23,720 --> 00:03:25,390
So player controller.

76
00:03:25,385 --> 00:03:29,335
And in here, if we scroll up the update,

77
00:03:29,330 --> 00:03:32,480
we are going to go ahead and end here.

78
00:03:32,480 --> 00:03:40,550
Say that if the level manager dot instance dot game

79
00:03:40,550 --> 00:03:43,340
is paused as game paused.

80
00:03:43,340 --> 00:03:44,800
So if it's true,

81
00:03:44,795 --> 00:03:48,245
that means that we are going to simply return.

82
00:03:48,245 --> 00:03:52,325
And remember what happens when we simply return,

83
00:03:52,325 --> 00:03:54,745
we just avoid the whole object.

84
00:03:54,740 --> 00:03:56,410
So if we get to this line,

85
00:03:56,405 --> 00:03:58,355
will check it's paused, true.

86
00:03:58,355 --> 00:04:01,105
Then we return and then we go back to the Update,

87
00:04:01,100 --> 00:04:02,660
and then we go back to the update.

88
00:04:02,660 --> 00:04:04,670
So the player does not do anything.

89
00:04:04,670 --> 00:04:07,060
He cannot move, he cannot point the gun.

90
00:04:07,055 --> 00:04:08,655
He cannot be animated,

91
00:04:08,659 --> 00:04:11,569
know dashing off, switching gums, no, nothing.

92
00:04:11,570 --> 00:04:14,050
So now back in our game,

93
00:04:14,045 --> 00:04:17,335
when we run the gain,

94
00:04:17,330 --> 00:04:20,530
we can now pause the game.

95
00:04:20,525 --> 00:04:23,185
And you can see that our player no longer moves

96
00:04:23,180 --> 00:04:24,380
even though we can still

97
00:04:24,380 --> 00:04:25,930
produce a bullet for some reason.

98
00:04:25,925 --> 00:04:29,995
Oh, that's because the actual shooting is on the

99
00:04:29,990 --> 00:04:34,690
what's called the the weapons system.

100
00:04:34,685 --> 00:04:37,085
So we resume the game, the boat flies off.

101
00:04:37,085 --> 00:04:39,265
You can do this anywhere you want

102
00:04:39,260 --> 00:04:41,420
inside of the update whenever you

103
00:04:41,420 --> 00:04:44,030
have some kind of so whereas

104
00:04:44,030 --> 00:04:49,330
the weapons system that we go in here, an update.

105
00:04:49,325 --> 00:04:50,965
There we go. Now we will no

106
00:04:50,960 --> 00:04:53,150
longer be able to fire bullets.

107
00:04:53,150 --> 00:04:54,530
You can also add this to

108
00:04:54,530 --> 00:04:56,590
the enemy controllers where they

109
00:04:56,585 --> 00:04:58,715
also shoot us with moles.

110
00:04:58,715 --> 00:05:01,165
So I guess this is the end of

111
00:05:01,160 --> 00:05:03,710
the creating menus and our game.

112
00:05:03,710 --> 00:05:06,560
I'm going to commit our changes.

113
00:05:06,560 --> 00:05:11,470
We'll call this made the pause menu.

114
00:05:11,465 --> 00:05:14,345
Actually balls.

115
00:05:14,345 --> 00:05:16,265
Again.

116
00:05:16,930 --> 00:05:19,940
Commit the changes. I hope you enjoy it.

117
00:05:19,940 --> 00:05:21,610
Let's look at our masters.

118
00:05:21,605 --> 00:05:23,935
As long as we have here, we still have time.

119
00:05:23,930 --> 00:05:25,400
This video was very short.

120
00:05:25,400 --> 00:05:31,150
I mean, look, look how much we have achieved together.

121
00:05:31,145 --> 00:05:33,475
This gain is incredible.

122
00:05:33,470 --> 00:05:35,300
It has so many things,

123
00:05:35,300 --> 00:05:36,770
it has so many options,

124
00:05:36,770 --> 00:05:39,280
so many variables, so many scripts,

125
00:05:39,275 --> 00:05:42,385
so many folders as the folders that we have

126
00:05:42,380 --> 00:05:44,060
are I don't know what her

127
00:05:44,060 --> 00:05:46,690
almost at a 100 folders, I think.

128
00:05:46,685 --> 00:05:50,765
Probably we have so much animations dislike.

129
00:05:50,765 --> 00:05:53,945
Look at how many and we still didn't animate everything.

130
00:05:53,945 --> 00:05:55,595
We still have a lot to do.

131
00:05:55,595 --> 00:05:57,635
Can animate the enemies when they shoot,

132
00:05:57,635 --> 00:06:00,425
there are still a lot of things that we can add.

133
00:06:00,425 --> 00:06:02,525
So because this video is short,

134
00:06:02,525 --> 00:06:06,565
I want you to take the time to pray,

135
00:06:06,560 --> 00:06:09,290
then breathe out, and

136
00:06:09,290 --> 00:06:12,130
appreciate how far you've

137
00:06:12,125 --> 00:06:14,405
come in your game development journey.

138
00:06:14,405 --> 00:06:16,045
And what an amazing review.

139
00:06:16,040 --> 00:06:19,510
You just let me left me anyways.

140
00:06:19,505 --> 00:06:21,095
Thank you so much for watching.

141
00:06:21,095 --> 00:06:23,935
I really, really appreciate if you've got to this point.

142
00:06:23,930 --> 00:06:25,640
If you did leave me a message

143
00:06:25,640 --> 00:06:27,490
on the score, let's have a chat.

144
00:06:27,485 --> 00:06:29,785
Tell the community how much you've come,

145
00:06:29,780 --> 00:06:31,100
how much you've learned,

146
00:06:31,100 --> 00:06:33,050
how much you have accomplished

147
00:06:33,050 --> 00:06:36,100
and see you in the next one, I guess,

148
00:06:36,095 --> 00:06:38,305
where we will be creating a boss fight,

149
00:06:38,300 --> 00:06:42,300
I believe, which is like the coolest thing in the world.

