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

2
00:00:03,030 --> 00:00:04,350
to a brand new video.

3
00:00:04,350 --> 00:00:06,660
And this is truly one of

4
00:00:06,660 --> 00:00:11,250
the coolest videos we've ever made so far, in my opinion.

5
00:00:11,250 --> 00:00:13,140
So what we're going to do is we're

6
00:00:13,140 --> 00:00:14,910
going to just run the game.

7
00:00:14,910 --> 00:00:17,630
And before I do that because we are experimenting,

8
00:00:17,625 --> 00:00:19,055
I'm just going to move this door out

9
00:00:19,050 --> 00:00:20,550
of the way around again.

10
00:00:20,550 --> 00:00:22,760
So we're playing, we open the door

11
00:00:22,755 --> 00:00:26,105
with some type of killing and whoa, we come here.

12
00:00:26,100 --> 00:00:27,360
What is that?

13
00:00:27,360 --> 00:00:29,540
Wow, a portal.

14
00:00:29,535 --> 00:00:31,505
What do you think would happen if

15
00:00:31,500 --> 00:00:33,440
I tried to maybe jump it?

16
00:00:33,435 --> 00:00:35,515
Well, What happened?

17
00:00:35,510 --> 00:00:39,770
Well, we are at level 2 or I mean at level one,

18
00:00:39,770 --> 00:00:41,420
we were at level two,

19
00:00:41,420 --> 00:00:42,560
should have pointed that out,

20
00:00:42,560 --> 00:00:45,140
but you can see right here that we do start in

21
00:00:45,140 --> 00:00:48,380
level two and then we go to level 1.

22
00:00:48,380 --> 00:00:50,360
We learned about portals,

23
00:00:50,360 --> 00:00:52,040
we learn about sin management,

24
00:00:52,040 --> 00:00:55,910
and we learn how to use a string variable.

25
00:00:55,910 --> 00:00:57,970
So let's not waste any more time.

26
00:00:57,965 --> 00:00:59,795
Let's get started.

27
00:00:59,795 --> 00:01:04,675
Oh, so time for some level of flow.

28
00:01:04,670 --> 00:01:08,540
And the first thing that we need for the level flow as

29
00:01:08,540 --> 00:01:11,240
the scene management and the way we manage

30
00:01:11,240 --> 00:01:14,540
scenes is through a scene manager,

31
00:01:14,540 --> 00:01:16,300
how convenient is that?

32
00:01:16,295 --> 00:01:18,205
But before we do all of that,

33
00:01:18,200 --> 00:01:20,240
the first thing that we need to do is

34
00:01:20,240 --> 00:01:23,140
actually create some type of portal.

35
00:01:23,135 --> 00:01:27,305
So a portal that will take us to another level.

36
00:01:27,305 --> 00:01:28,885
Now, before we do that,

37
00:01:28,880 --> 00:01:31,660
we need an actual other level to go to.

38
00:01:31,655 --> 00:01:33,955
So I'm going to go into the scenes in

39
00:01:33,950 --> 00:01:36,790
here and I'm going to duplicate s2.

40
00:01:36,785 --> 00:01:38,215
I'm going to open it up.

41
00:01:38,210 --> 00:01:39,890
So now we have seen three.

42
00:01:39,890 --> 00:01:44,000
It's the same, it's exactly the same as the s2,

43
00:01:44,000 --> 00:01:47,150
but all I'm going to change are the tiles on the ground.

44
00:01:47,150 --> 00:01:50,560
So I'll go into tile palette.

45
00:01:50,555 --> 00:01:52,355
I'm going to choose ground,

46
00:01:52,355 --> 00:01:56,105
and I'm going to make this a color of green.

47
00:01:56,105 --> 00:01:58,685
And I'll just change this up a bit.

48
00:01:58,685 --> 00:02:00,595
There you go.

49
00:02:00,590 --> 00:02:03,520
So that's a bout what I want to do.

50
00:02:03,515 --> 00:02:05,435
I'll cover this part,

51
00:02:05,435 --> 00:02:07,195
this part,

52
00:02:07,190 --> 00:02:10,550
and this part just so we can differentiate between them.

53
00:02:10,550 --> 00:02:11,980
I don't want to spend time

54
00:02:11,975 --> 00:02:13,705
creating a whole different level.

55
00:02:13,700 --> 00:02:16,670
It will take a lot and there is no actual purpose,

56
00:02:16,670 --> 00:02:19,000
but for you while creating your game,

57
00:02:18,995 --> 00:02:20,375
I do recommend that you

58
00:02:20,375 --> 00:02:22,205
go through the hassle of doing it.

59
00:02:22,205 --> 00:02:23,965
It's good practice if you want to

60
00:02:23,960 --> 00:02:26,110
create your own game from the styles.

61
00:02:26,105 --> 00:02:28,385
Enough talk, let's get started.

62
00:02:28,385 --> 00:02:31,225
Save that. Let's go back to Test2.

63
00:02:31,220 --> 00:02:34,690
So now we have the friends between test2 and test3.

64
00:02:34,685 --> 00:02:38,945
I think it's time to call this level 2 and level 3.

65
00:02:38,945 --> 00:02:47,915
So Level 2, level 1 or no.

66
00:02:47,915 --> 00:02:51,085
Let's keep this as a, this was actually a test.

67
00:02:51,080 --> 00:02:53,610
And level three.

68
00:02:55,410 --> 00:02:58,530
Actually, this should be,

69
00:02:58,525 --> 00:03:00,225
okay. Wait a second.

70
00:03:00,220 --> 00:03:02,110
Let's keep this level 3.

71
00:03:02,109 --> 00:03:06,099
Sure, we load, this will become level one.

72
00:03:06,100 --> 00:03:08,160
And this one is level two.

73
00:03:08,155 --> 00:03:09,765
So we have just one,

74
00:03:09,760 --> 00:03:12,250
level one, level two, okay,

75
00:03:12,250 --> 00:03:13,800
so back in level 2,

76
00:03:13,795 --> 00:03:17,155
and here we are going to have some kind of exit portal.

77
00:03:17,155 --> 00:03:20,055
I've provided you with the resources for the portals,

78
00:03:20,050 --> 00:03:21,430
and I chose this one.

79
00:03:21,430 --> 00:03:22,810
And you can see that you have

80
00:03:22,810 --> 00:03:25,510
25 or 20 portals, I don't know.

81
00:03:25,510 --> 00:03:27,040
And you also have this green one,

82
00:03:27,040 --> 00:03:29,910
but I'm going to use the 15.

83
00:03:29,905 --> 00:03:30,885
Was it 15 year?

84
00:03:30,880 --> 00:03:31,920
It was 15.

85
00:03:31,915 --> 00:03:33,945
So back in here in the sprites,

86
00:03:33,940 --> 00:03:40,060
right-click Create Folder, portal at Enter.

87
00:03:40,055 --> 00:03:43,855
Double-click in here, and I'm going to add all of

88
00:03:43,850 --> 00:03:48,700
the images and wait for them to be added. Very good.

89
00:03:48,695 --> 00:03:50,155
I'm going to right-click create

90
00:03:50,150 --> 00:03:52,340
an empty game object which will be called

91
00:03:52,340 --> 00:03:56,530
the portal enter specter.

92
00:03:56,525 --> 00:03:58,815
Set z to 0.

93
00:03:58,819 --> 00:04:00,069
There we go.

94
00:04:00,065 --> 00:04:01,385
Let's move it in here.

95
00:04:01,385 --> 00:04:03,235
Add a component or what?

96
00:04:03,230 --> 00:04:04,640
Let's not add a component.

97
00:04:04,640 --> 00:04:07,420
Let's add a animator.

98
00:04:07,415 --> 00:04:09,275
We're going to go to the window.

99
00:04:09,275 --> 00:04:11,305
And actually, before we do that,

100
00:04:11,300 --> 00:04:14,750
let's add one of the images in here to the portal.

101
00:04:14,750 --> 00:04:16,500
Can we add it immediately?

102
00:04:16,504 --> 00:04:17,554
Nope, can't.

103
00:04:17,555 --> 00:04:21,685
Let's add a sprite render.

104
00:04:21,680 --> 00:04:24,230
And we'll add just this image right here.

105
00:04:24,230 --> 00:04:27,560
And let's set it as the player. And there we go.

106
00:04:27,560 --> 00:04:29,060
You can see it's a bit small.

107
00:04:29,060 --> 00:04:34,080
Let's choose all of the images and make them 50 apply.

108
00:04:34,084 --> 00:04:36,594
So it will double in size, okay,

109
00:04:36,590 --> 00:04:38,980
girl rate and make it point.

110
00:04:38,975 --> 00:04:41,005
Will it become better? Let's zoom in and see

111
00:04:41,000 --> 00:04:43,030
sometimes point is not the best filter.

112
00:04:43,025 --> 00:04:44,635
Sometimes you keep it bi-linear,

113
00:04:44,630 --> 00:04:46,640
it's butter, and in this case it is.

114
00:04:46,640 --> 00:04:48,620
So bi-linear, they are smoother,

115
00:04:48,620 --> 00:04:51,100
you'll notice now it's a bit smoother.

116
00:04:51,095 --> 00:04:53,755
I like it better, do whatever you want with it.

117
00:04:53,750 --> 00:04:54,940
And you know what?

118
00:04:54,935 --> 00:04:57,725
I'm actually because the room is already big,

119
00:04:57,725 --> 00:04:59,995
I'm going to make it 25.

120
00:04:59,990 --> 00:05:01,250
Yep, there we go.

121
00:05:01,250 --> 00:05:04,420
Okay, 25 is good. Nice.

122
00:05:04,415 --> 00:05:06,895
So there we go. We have this portal right here.

123
00:05:06,890 --> 00:05:10,060
Let's go into the window.

124
00:05:10,055 --> 00:05:12,895
Animations, animations.

125
00:05:12,890 --> 00:05:14,990
So we've already covered how we do this.

126
00:05:14,990 --> 00:05:17,410
I'm not going to go into too much detail.

127
00:05:17,405 --> 00:05:23,765
I'm going to create assets, animations, portal.

128
00:05:23,765 --> 00:05:25,045
Make sure to always create

129
00:05:25,040 --> 00:05:26,990
folders and keep everything small.

130
00:05:26,990 --> 00:05:30,220
So portal swirl.

131
00:05:30,215 --> 00:05:32,855
Or this will be just the animator

132
00:05:32,855 --> 00:05:35,005
or nano, and this is the animation.

133
00:05:35,000 --> 00:05:38,200
Swirled because the portal is swirling.

134
00:05:38,195 --> 00:05:40,765
I'm going to select all of these and drag them in here.

135
00:05:40,760 --> 00:05:43,010
Now when we play, there you go.

136
00:05:43,010 --> 00:05:44,150
I think this is good enough.

137
00:05:44,150 --> 00:05:46,810
You don't need to make it bigger or smaller.

138
00:05:46,805 --> 00:05:47,695
Excellent.

139
00:05:47,690 --> 00:05:50,200
So now we have this portal working.

140
00:05:50,195 --> 00:05:52,255
The next thing we're going to do is obviously we'll

141
00:05:52,250 --> 00:05:54,650
add some kind of Collider in here.

142
00:05:54,650 --> 00:05:58,160
So add a circle,

143
00:05:58,160 --> 00:06:03,350
circle collider 2D, and it's a bit big.

144
00:06:03,350 --> 00:06:05,720
Let's make the radius a little

145
00:06:05,720 --> 00:06:08,240
bit smaller so the enemy needs, the enemy,

146
00:06:08,240 --> 00:06:12,620
the player needs to jump into the portal immediately to

147
00:06:12,620 --> 00:06:14,720
be teleported to the next level

148
00:06:14,720 --> 00:06:17,360
or whatever level that we want to tell apart too.

149
00:06:17,360 --> 00:06:20,330
And this is the part where we choose which,

150
00:06:20,330 --> 00:06:22,160
where do we want to be teleported?

151
00:06:22,160 --> 00:06:23,910
Is it always the next level

152
00:06:23,905 --> 00:06:26,485
doesn't have to be because later on in the,

153
00:06:26,480 --> 00:06:29,720
I believe the section where we generate levels,

154
00:06:29,720 --> 00:06:31,150
I think it's the last one.

155
00:06:31,145 --> 00:06:32,335
We will be choosing

156
00:06:32,330 --> 00:06:34,870
random levels just like we have in Hades.

157
00:06:34,865 --> 00:06:36,895
So we'll create different types of layouts,

158
00:06:36,890 --> 00:06:39,680
have different types of levels that we go through.

159
00:06:39,680 --> 00:06:43,050
So let's go into the scripts.

160
00:06:43,054 --> 00:06:47,964
Let's add a script in here for the portal.

161
00:06:47,960 --> 00:06:49,700
We're going to call it level exit.

162
00:06:49,700 --> 00:06:51,530
Let's call it the levels,

163
00:06:51,530 --> 00:06:53,990
level flow that will slow.

164
00:06:53,990 --> 00:06:55,130
I think that's good.

165
00:06:55,130 --> 00:06:57,950
Right-clicking here, create a C-sharp script

166
00:06:57,950 --> 00:07:00,130
which will be the level exit.

167
00:07:00,125 --> 00:07:02,615
I don't even remember if we will be having

168
00:07:02,615 --> 00:07:05,675
other scripts related to level SOPA.

169
00:07:05,675 --> 00:07:06,955
Let's keep it at that.

170
00:07:06,950 --> 00:07:09,940
So I'm going to click on here.

171
00:07:09,935 --> 00:07:12,365
And of course we are going to make it a trigger.

172
00:07:12,365 --> 00:07:14,195
This collider should be a trigger.

173
00:07:14,195 --> 00:07:16,055
And let's add the level of exit.

174
00:07:16,055 --> 00:07:20,315
And finally, I'll go into the Prefabs and I'm going to go

175
00:07:20,315 --> 00:07:25,145
here and create a prefab for the,

176
00:07:25,145 --> 00:07:27,475
should I just make a portal in here?

177
00:07:27,470 --> 00:07:31,930
Let's say we can add, create in here,

178
00:07:31,925 --> 00:07:35,545
something like maybe, okay,

179
00:07:35,540 --> 00:07:38,900
let's just make the portals, portals.

180
00:07:38,900 --> 00:07:41,960
Open this up. Portal.

181
00:07:41,960 --> 00:07:44,320
And maybe portal one, maybe non port one.

182
00:07:44,315 --> 00:07:46,955
Let's just keep it at portal, save all of that.

183
00:07:46,955 --> 00:07:49,435
And now let's open up the script in here.

184
00:07:49,430 --> 00:07:51,650
So we have the level exit opens

185
00:07:51,650 --> 00:07:54,080
up and what do we want to do in here?

186
00:07:54,080 --> 00:07:56,110
So the first thing we want to have

187
00:07:56,105 --> 00:07:58,585
as obviously a serialized field,

188
00:07:58,580 --> 00:08:01,070
which is going to be a string of type string.

189
00:08:01,070 --> 00:08:02,780
This is the first time we create

190
00:08:02,780 --> 00:08:04,910
a variable of type string, I believe.

191
00:08:04,910 --> 00:08:09,470
And this is going to be the level to load.

192
00:08:09,470 --> 00:08:14,760
Great, so now we can go back in here, shows the portal.

193
00:08:14,950 --> 00:08:19,010
And we can select the level that we want to go to.

194
00:08:19,010 --> 00:08:21,440
And the way we do that is we need to make sure that

195
00:08:21,440 --> 00:08:23,870
we get the exact name that we want.

196
00:08:23,870 --> 00:08:26,420
So and scenes we copy, for example,

197
00:08:26,420 --> 00:08:29,720
level also we are on level 2 right now.

198
00:08:29,720 --> 00:08:31,220
And it weighs no worries.

199
00:08:31,220 --> 00:08:32,930
Let's go and two,

200
00:08:32,930 --> 00:08:36,050
we go from level two to level one. Sure. Why not?

201
00:08:36,050 --> 00:08:39,140
So we are going to lock this down,

202
00:08:39,140 --> 00:08:41,920
select level to select Level 1.

203
00:08:41,915 --> 00:08:44,545
Copy this, paste it in here.

204
00:08:44,540 --> 00:08:46,420
Oh, no, wait, wait, wait, wait.

205
00:08:46,415 --> 00:08:49,915
We should select this one and now we copy it here.

206
00:08:49,910 --> 00:08:51,740
So now this portal,

207
00:08:51,740 --> 00:08:52,850
when we trigger it,

208
00:08:52,850 --> 00:08:55,300
we should go to level 2 load.

209
00:08:55,295 --> 00:08:58,385
But how are we actually going to do this?

210
00:08:58,385 --> 00:09:00,305
I'm going to go back in here.

211
00:09:00,305 --> 00:09:03,095
And let's remove start an update for now.

212
00:09:03,095 --> 00:09:06,065
Just for now we'll later on need them course.

213
00:09:06,065 --> 00:09:08,575
And in here I'm going to create an entrepreneur

214
00:09:08,570 --> 00:09:12,040
enter d. We already know how this works.

215
00:09:12,035 --> 00:09:14,865
We are of course going to make sure that the collision,

216
00:09:14,869 --> 00:09:19,099
the tag, is equal to Player O.

217
00:09:19,100 --> 00:09:21,050
So now you're thinking,

218
00:09:21,050 --> 00:09:22,610
Oh, Michael, well what's this?

219
00:09:22,610 --> 00:09:24,370
What, what is the compare tag?

220
00:09:24,365 --> 00:09:27,085
Well, you can use compare tag is much better,

221
00:09:27,080 --> 00:09:29,800
but I wanted to show you a different way

222
00:09:29,795 --> 00:09:33,025
and now it's time to load the next scene.

223
00:09:33,020 --> 00:09:34,780
How are we going to do this?

224
00:09:34,775 --> 00:09:38,185
How do we actually move from one scene to the other?

225
00:09:38,180 --> 00:09:40,130
Let me show you just a little bit.

226
00:09:40,130 --> 00:09:43,160
So this is the scene manager

227
00:09:43,160 --> 00:09:44,540
and you can see right here that

228
00:09:44,540 --> 00:09:46,730
we have a lot of things that we

229
00:09:46,730 --> 00:09:49,180
can use static methods, events.

230
00:09:49,175 --> 00:09:51,775
I'm going to leave it to you because later on in

231
00:09:51,770 --> 00:09:54,530
just a bit we will have a small challenge.

232
00:09:54,530 --> 00:09:58,160
But what I will help you with is that I'm going to make

233
00:09:58,160 --> 00:10:01,910
sure that in here whenever we want to use scenes,

234
00:10:01,910 --> 00:10:03,400
we need to add the using

235
00:10:03,395 --> 00:10:06,535
Unity engine dot scene management.

236
00:10:06,530 --> 00:10:09,850
Save that. And now we can do a lot of things

237
00:10:09,845 --> 00:10:13,415
with our scenes or we can actually manage our scenes.

238
00:10:13,415 --> 00:10:15,175
So before I'll issue you

239
00:10:15,170 --> 00:10:17,840
the challenge of finding which method

240
00:10:17,840 --> 00:10:22,620
we are going to use or how can you use this unity?

241
00:10:22,624 --> 00:10:24,304
Where is it the scene manager?

242
00:10:24,305 --> 00:10:25,825
I'm going to show you how

243
00:10:25,820 --> 00:10:27,590
to actually access and because I

244
00:10:27,590 --> 00:10:29,150
want this challenge for you to

245
00:10:29,150 --> 00:10:31,270
work immediately when you start.

246
00:10:31,265 --> 00:10:33,325
If you go into the file right here we

247
00:10:33,320 --> 00:10:35,410
have something called the build settings.

248
00:10:35,405 --> 00:10:38,965
If we click on it, we can see the scenes in built.

249
00:10:38,960 --> 00:10:41,480
And this is where we actually build our game.

250
00:10:41,480 --> 00:10:43,910
And you can see that we have multiple options.

251
00:10:43,910 --> 00:10:45,740
We can use Windows,

252
00:10:45,740 --> 00:10:48,200
we can use iOS or whatever this is,

253
00:10:48,200 --> 00:10:50,750
tvOS, ios, PS4, PS5,

254
00:10:50,750 --> 00:10:53,060
xbox One, et cetera, et cetera.

255
00:10:53,060 --> 00:10:56,080
You can create things for different platforms,

256
00:10:56,075 --> 00:10:58,675
and the PC is the one that we're going to use.

257
00:10:58,670 --> 00:11:00,380
We can do different things.

258
00:11:00,380 --> 00:11:01,790
And this is where you add

259
00:11:01,790 --> 00:11:02,930
all the scenes or

260
00:11:02,930 --> 00:11:05,050
the levels that you'll have in your game.

261
00:11:05,045 --> 00:11:07,345
So for now, the only scene that is

262
00:11:07,340 --> 00:11:10,010
added into the bill is the scene test1.

263
00:11:10,010 --> 00:11:12,260
And without adding season here,

264
00:11:12,260 --> 00:11:14,450
you will not be able to travel from

265
00:11:14,450 --> 00:11:17,150
one to the other using Scene Manager.

266
00:11:17,150 --> 00:11:18,890
So well that clear,

267
00:11:18,890 --> 00:11:20,980
I'm going to add the level one.

268
00:11:20,975 --> 00:11:25,105
And we can also do this by AD open scenes. There you go.

269
00:11:25,100 --> 00:11:26,990
You can see at the scene 2

270
00:11:26,990 --> 00:11:29,150
because it's an open scene. Okay.

271
00:11:29,150 --> 00:11:30,710
Great. Can we added another time?

272
00:11:30,710 --> 00:11:31,570
No, we can't.

273
00:11:31,565 --> 00:11:32,875
And you can see also that

274
00:11:32,870 --> 00:11:35,180
these scenes have indexes on them.

275
00:11:35,180 --> 00:11:38,240
We'll not be using indexes of the scenes right now,

276
00:11:38,240 --> 00:11:42,290
but keep it in mind because later on they will come up.

277
00:11:42,290 --> 00:11:47,290
So settings, save that again, File BuildSettings.

278
00:11:47,285 --> 00:11:48,095
There you go.

279
00:11:48,095 --> 00:11:51,425
At all of the scenes that you have whenever you want to

280
00:11:51,425 --> 00:11:53,425
use Scene Manager to go from

281
00:11:53,420 --> 00:11:55,580
one to the other, close that.

282
00:11:55,580 --> 00:11:58,040
Now, what are we going to do?

283
00:11:58,040 --> 00:11:59,390
We are going to issue you

284
00:11:59,390 --> 00:12:02,120
the challenge to load the next scene.

285
00:12:02,120 --> 00:12:04,010
So look through the scene manager

286
00:12:04,010 --> 00:12:05,840
in Unity's documentation,

287
00:12:05,840 --> 00:12:08,060
find the appropriate function that

288
00:12:08,060 --> 00:12:10,220
can help us go to a different scene.

289
00:12:10,220 --> 00:12:12,130
So this is astronaut use.

290
00:12:12,125 --> 00:12:14,755
And finally, make sure it's a method that

291
00:12:14,750 --> 00:12:17,270
uses a string as an argument.

292
00:12:17,269 --> 00:12:22,409
So pause the video right now and go to the Chaldean.

293
00:12:22,420 --> 00:12:24,590
Okay, Welcome back.

294
00:12:24,590 --> 00:12:26,880
So let's say I am a student

295
00:12:26,884 --> 00:12:29,704
of Michael Moore and I'm just more,

296
00:12:29,705 --> 00:12:31,355
more what everyone's saying.

297
00:12:31,355 --> 00:12:35,505
And I'm just learning how to use the scene manager.

298
00:12:35,509 --> 00:12:38,029
Okay. What is the goal, what is the challenge?

299
00:12:38,030 --> 00:12:40,460
He asked me that I should

300
00:12:40,460 --> 00:12:43,160
load the next scene. Okay, great.

301
00:12:43,160 --> 00:12:44,740
Let's look. What do we have?

302
00:12:44,735 --> 00:12:46,075
So we have seen count,

303
00:12:46,070 --> 00:12:47,990
seem counting building doesn't look

304
00:12:47,990 --> 00:12:49,990
like it helps create seen.

305
00:12:49,985 --> 00:12:50,375
Nope.

306
00:12:50,375 --> 00:12:52,945
Gets seen. Nope. I don't think that's held.

307
00:12:52,940 --> 00:12:54,640
Gets in at no.

308
00:12:54,635 --> 00:12:57,605
Building by name, gets seen.

309
00:12:57,605 --> 00:12:59,815
Load, load a scene,

310
00:12:59,810 --> 00:13:01,960
loads the scene by its name.

311
00:13:01,955 --> 00:13:03,935
Wait, what was the challenge?

312
00:13:03,934 --> 00:13:08,164
String as an argument, o k.

313
00:13:08,165 --> 00:13:11,815
This is a bit faster than I should, but no worries.

314
00:13:11,810 --> 00:13:13,850
Load scene, Let's click on Load seen.

315
00:13:13,850 --> 00:13:16,420
Hopefully we have Internet will do so.

316
00:13:16,415 --> 00:13:18,505
Declaration, okay, we load seen.

317
00:13:18,500 --> 00:13:22,270
We can use the symbol index or we can use the same name,

318
00:13:22,265 --> 00:13:24,295
excellence, you name, name.

319
00:13:24,290 --> 00:13:26,200
Scription loads the scene.

320
00:13:26,195 --> 00:13:28,475
Excellent, This is what I'm going to use.

321
00:13:28,475 --> 00:13:30,655
So now on Trigger Enter,

322
00:13:30,650 --> 00:13:31,910
if it's the player,

323
00:13:31,910 --> 00:13:34,270
what we're going to do as we are going

324
00:13:34,265 --> 00:13:36,815
to see how this is actually done.

325
00:13:36,815 --> 00:13:39,545
So if I scroll down in here,

326
00:13:39,545 --> 00:13:44,345
okay, So scene manager dot load seen them.

327
00:13:44,345 --> 00:13:46,285
Is there something else I need?

328
00:13:46,280 --> 00:13:47,830
No, nothing.

329
00:13:47,825 --> 00:13:49,195
Let's continue on.

330
00:13:49,190 --> 00:13:51,170
Or maybe at this point you might be thinking,

331
00:13:51,170 --> 00:13:54,200
well what is this load seen Moldau additive?

332
00:13:54,200 --> 00:13:57,230
Well, if you don't know, let's just try it.

333
00:13:57,230 --> 00:14:01,100
So scene manager, dot load scene.

334
00:14:01,100 --> 00:14:03,710
I'm going to open the brackets and I can see right

335
00:14:03,710 --> 00:14:05,990
here these one out of six.

336
00:14:05,990 --> 00:14:07,540
So the scene build index.

337
00:14:07,535 --> 00:14:09,085
Nope, I don't want that.

338
00:14:09,080 --> 00:14:11,740
Okay, see you name this is what I want,

339
00:14:11,735 --> 00:14:13,945
but we have four others and

340
00:14:13,940 --> 00:14:16,130
this is a good time to teach you that.

341
00:14:16,130 --> 00:14:18,140
Sometimes a method can take

342
00:14:18,140 --> 00:14:22,010
12 or maybe even more arguments

343
00:14:22,010 --> 00:14:24,110
based on what you give it, it will work.

344
00:14:24,110 --> 00:14:26,810
So for example, we can add the mode.

345
00:14:26,810 --> 00:14:28,810
You can see right here, load Scene mode,

346
00:14:28,805 --> 00:14:31,325
this is what we were talking about right here.

347
00:14:31,325 --> 00:14:33,795
So load Scene mode, additive.

348
00:14:33,799 --> 00:14:35,499
I don't even know what that is.

349
00:14:35,495 --> 00:14:38,755
But in here you can see that there is an option for it.

350
00:14:38,750 --> 00:14:41,440
Anyways, this was a side note.

351
00:14:41,435 --> 00:14:42,595
What do we want to use?

352
00:14:42,590 --> 00:14:43,420
Which scene?

353
00:14:43,415 --> 00:14:46,705
Well, we already have it with the level to load.

354
00:14:46,700 --> 00:14:48,920
So Lovell to load

355
00:14:48,920 --> 00:14:51,080
as this scene that we are going to load.

356
00:14:51,080 --> 00:14:53,570
So everything should be working fine.

357
00:14:53,569 --> 00:14:55,809
I'm going to go back into Unity.

358
00:14:55,805 --> 00:14:59,525
Save that, make the game a bit bigger.

359
00:14:59,524 --> 00:15:01,984
Also, I need to kill all the enemies.

360
00:15:01,985 --> 00:15:04,975
And honestly I don't have time to kill all of them.

361
00:15:04,970 --> 00:15:10,210
That's just get the doors get swung open, run the game.

362
00:15:10,205 --> 00:15:13,375
Also, it's going to close in any case.

363
00:15:13,370 --> 00:15:15,100
And we have these lines, okay?

364
00:15:15,095 --> 00:15:17,495
So first of all, don't maximize on play.

365
00:15:17,495 --> 00:15:19,145
Now run the game.

366
00:15:19,145 --> 00:15:21,985
These lines are bothering me a bit,

367
00:15:21,980 --> 00:15:23,890
so I'm going to choose door 1,

368
00:15:23,885 --> 00:15:25,685
I'm going to deactivated.

369
00:15:25,685 --> 00:15:30,245
I'm going to walk through why it is that can I shoot it?

370
00:15:30,245 --> 00:15:31,505
I think I can.

371
00:15:31,505 --> 00:15:33,355
It doesn't get destroyed. No, it doesn't.

372
00:15:33,350 --> 00:15:35,070
So if I walk closely,

373
00:15:35,074 --> 00:15:36,954
you can see I'm at level 2,

374
00:15:36,950 --> 00:15:38,840
I'm off through it to 0.

375
00:15:38,840 --> 00:15:41,020
What happened? What happened?

376
00:15:41,015 --> 00:15:43,705
I am at level 1.

377
00:15:43,700 --> 00:15:46,310
Wo, how cool is that?

378
00:15:46,310 --> 00:15:48,020
Seriously, guys?

379
00:15:48,020 --> 00:15:50,120
This is one of the coolest things

380
00:15:50,120 --> 00:15:52,060
that have happened today.

381
00:15:52,055 --> 00:15:54,355
We suddenly moved from level

382
00:15:54,350 --> 00:15:56,720
2 to level 1 through a portal.

383
00:15:56,720 --> 00:15:58,040
Very nice.

384
00:15:58,040 --> 00:16:00,130
So now everything is working,

385
00:16:00,125 --> 00:16:01,655
but it's very fast.

386
00:16:01,655 --> 00:16:04,735
And honestly we don't want to happen that fast.

387
00:16:04,730 --> 00:16:06,830
We want to make it a bit slow and add

388
00:16:06,830 --> 00:16:11,180
a bit more character to the game as we move through it.

389
00:16:11,180 --> 00:16:13,900
So I'll see you in the next video.

390
00:16:13,895 --> 00:16:17,155
Of course, don't forget to commit your changes.

391
00:16:17,150 --> 00:16:18,310
Look how far we've come.

392
00:16:18,305 --> 00:16:20,725
Look why I love committing my changes.

393
00:16:20,720 --> 00:16:23,470
Well, we started with an initial commit,

394
00:16:23,465 --> 00:16:26,155
added idling and hast animations

395
00:16:26,150 --> 00:16:28,250
created player added bullets,

396
00:16:28,250 --> 00:16:30,460
created animation for the enemy,

397
00:16:30,455 --> 00:16:32,855
damage, enemy deterioration.

398
00:16:32,855 --> 00:16:34,135
I don't even know what the lock,

399
00:16:34,130 --> 00:16:35,540
how much we have

400
00:16:35,540 --> 00:16:38,960
accomplished and we are maybe not even halfway.

401
00:16:38,960 --> 00:16:40,250
Well, very nice.

402
00:16:40,250 --> 00:16:41,750
So I hope you're having fun,

403
00:16:41,750 --> 00:16:43,130
I hope you're enjoying and I'll

404
00:16:43,130 --> 00:16:45,600
see you in the next video.

