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

2
00:00:03,570 --> 00:00:07,620
So we've just made our game a lot more cooler.

3
00:00:07,620 --> 00:00:09,030
So now when we should award,

4
00:00:09,030 --> 00:00:11,330
we don't just have our bullets disappearing.

5
00:00:11,325 --> 00:00:14,805
We have our bullet's going in a puff of smoke.

6
00:00:14,805 --> 00:00:16,305
So when we shoot around,

7
00:00:16,305 --> 00:00:22,275
you can see that we have this little cool effect that gets destroyed.

8
00:00:22,275 --> 00:00:26,505
Notice right here that it gets destroyed after a certain time,

9
00:00:26,505 --> 00:00:30,465
which is something that we do need to take into consideration.

10
00:00:30,465 --> 00:00:35,265
So let's not waste any more time and let's get started.

11
00:00:35,265 --> 00:00:42,605
Oh, so time to add some weight to our bullet impacts.

12
00:00:42,605 --> 00:00:46,505
And we'll do that by adding an impact effect.

13
00:00:46,504 --> 00:00:51,814
So I'm going to go into the assets and I'm going to go into the sprites folder,

14
00:00:51,815 --> 00:00:55,075
and I'm going to create a new folder in here,

15
00:00:55,070 --> 00:00:58,690
which will be the bullets fact.

16
00:00:58,685 --> 00:01:02,495
And in here we're going to go into the resources.

17
00:01:02,495 --> 00:01:05,915
And I've provided you with a couple of facts that I found.

18
00:01:05,915 --> 00:01:08,755
You can use whichever one you want.

19
00:01:08,750 --> 00:01:12,050
Or you can also find some on the website,

20
00:01:12,050 --> 00:01:14,620
open game art.com or any other website.

21
00:01:14,615 --> 00:01:18,095
So you can see right here we have three effects.

22
00:01:18,095 --> 00:01:20,845
This one with a bit of smoke,

23
00:01:20,840 --> 00:01:24,260
this one with a bit less smoke,

24
00:01:24,260 --> 00:01:25,600
but it's a bit weird.

25
00:01:25,595 --> 00:01:29,755
And this one, now I'm going to use the OH,

26
00:01:29,750 --> 00:01:32,570
so you see it has the impact metal impact.

27
00:01:32,570 --> 00:01:33,640
Metal impact metal.

28
00:01:33,635 --> 00:01:34,735
No worries about that.

29
00:01:34,730 --> 00:01:36,710
We'll just have to do with what we have.

30
00:01:36,710 --> 00:01:38,320
We'll use the impact metal.

31
00:01:38,315 --> 00:01:40,645
I'll use the first one. Sure.

32
00:01:40,640 --> 00:01:41,420
Why not?

33
00:01:41,420 --> 00:01:43,610
So how are we going to do this?

34
00:01:43,610 --> 00:01:46,190
We are going to slice up the sprite.

35
00:01:46,190 --> 00:01:49,160
We are going to create an animation and then we are

36
00:01:49,160 --> 00:01:52,250
going to play it whenever we hit the object.

37
00:01:52,250 --> 00:01:54,470
I'm going to slice this up if you want.

38
00:01:54,470 --> 00:01:59,390
We can do this together at the same time and see who does it faster or better.

39
00:01:59,390 --> 00:02:02,600
So first thing, we select the first 1.

40
00:02:02,600 --> 00:02:05,160
First impact, make it multiple.

41
00:02:05,164 --> 00:02:06,664
Apply changes.

42
00:02:06,665 --> 00:02:08,545
Let's make it point.

43
00:02:08,540 --> 00:02:10,670
Maybe we don't need to make it point.

44
00:02:10,670 --> 00:02:13,060
Let's go ahead and Sprite Editor.

45
00:02:13,055 --> 00:02:17,095
Okay, the particle of smoke or not visible,

46
00:02:17,090 --> 00:02:22,330
but we are going to go ahead and slice this up by grid size.

47
00:02:22,325 --> 00:02:25,575
Let's see how big is this grid.

48
00:02:25,579 --> 00:02:28,549
So we have 1, 2, 3.

49
00:02:28,550 --> 00:02:32,200
Okay, so I'm going to get my handy calculator.

50
00:02:32,195 --> 00:02:36,805
And the way I'm going to slice this up is because we have this 960.

51
00:02:36,800 --> 00:02:39,170
You can see it right here down on the right,

52
00:02:39,170 --> 00:02:45,770
960 on the horizontal and 576 on the vertical.

53
00:02:45,770 --> 00:02:49,280
So 576 divided by,

54
00:02:49,280 --> 00:02:51,130
because there are three lines,

55
00:02:51,125 --> 00:02:54,055
I believe it's 192.

56
00:02:54,050 --> 00:02:58,840
So on the y-axis, it's 192.

57
00:02:58,835 --> 00:03:02,365
And in here we have 12345,

58
00:03:02,360 --> 00:03:08,080
so 960 divided by 5 also 192.

59
00:03:08,075 --> 00:03:10,705
Great, should have seen that coming.

60
00:03:10,700 --> 00:03:13,300
So we have sliced up squares.

61
00:03:13,295 --> 00:03:14,015
Very nice.

62
00:03:14,015 --> 00:03:15,485
Apply the changes.

63
00:03:15,485 --> 00:03:16,285
There we go.

64
00:03:16,280 --> 00:03:17,890
Now we have all of these.

65
00:03:17,885 --> 00:03:20,515
I'm going to create a new game object in here,

66
00:03:20,510 --> 00:03:24,000
and this will be the bullet impact.

67
00:03:24,004 --> 00:03:28,674
So bullet impact on wall.

68
00:03:28,670 --> 00:03:31,030
And there we go. Here it is.

69
00:03:31,025 --> 00:03:36,695
I'm going to go ahead and add a sprite renderer to it.

70
00:03:36,695 --> 00:03:42,245
So sprite renderer, and I'm just going to give it this effect right here.

71
00:03:42,245 --> 00:03:43,645
Where is it?

72
00:03:43,640 --> 00:03:46,610
Let's add this impact of fact right here.

73
00:03:46,610 --> 00:03:47,450
Can we see it?

74
00:03:47,450 --> 00:03:48,440
Is it visible?

75
00:03:48,440 --> 00:03:51,470
It's behind. Should we create a sorting layer?

76
00:03:51,470 --> 00:03:52,580
Sure. Why not?

77
00:03:52,580 --> 00:03:57,350
Let's go ahead and create or we can make a deep layer bullets sorting layer.

78
00:03:57,350 --> 00:04:03,140
The bullets. Sure, let's keep it that because obviously it's part of the bullets,

79
00:04:03,140 --> 00:04:08,180
so it's logical to make it on the bullets layer that will set it in here.

80
00:04:08,180 --> 00:04:10,760
Is that big enough? Maybe we want to make it bigger.

81
00:04:10,760 --> 00:04:15,410
Let's go ahead and make them think 50 is a lot.

82
00:04:15,410 --> 00:04:19,220
Let's make it 75 and see how big that is.

83
00:04:19,220 --> 00:04:23,120
Okay, maybe we can add, make it 50,

84
00:04:23,119 --> 00:04:26,029
apply that, and maybe remove the point,

85
00:04:26,030 --> 00:04:28,550
make it bi-linear so it's a bit smoother.

86
00:04:28,550 --> 00:04:29,990
Yeah, I like that more.

87
00:04:29,990 --> 00:04:32,950
So there you go. This will be our impact.

88
00:04:32,945 --> 00:04:37,075
I'm going to add an animator component in here.

89
00:04:37,070 --> 00:04:40,510
And let's choose this one.

90
00:04:40,505 --> 00:04:43,005
Animations actually.

91
00:04:43,009 --> 00:04:45,279
Sure, Let's go ahead and create.

92
00:04:45,275 --> 00:04:49,375
This will be in the assets animations.

93
00:04:49,370 --> 00:04:56,540
And this will be called the bullet Impact wall.

94
00:04:56,540 --> 00:04:58,730
And I'm calling it the bullet impactful.

95
00:04:58,730 --> 00:05:02,270
Well, because later on we will have different types of impacts.

96
00:05:02,270 --> 00:05:07,500
So in here we're going to have the bullet.

97
00:05:07,650 --> 00:05:10,760
Bullet hitting wall.

98
00:05:12,420 --> 00:05:14,260
Save that.

99
00:05:14,260 --> 00:05:18,740
There we go. So you can see immediately because we already had the animator component,

100
00:05:18,744 --> 00:05:21,794
the controller gets sent here that's moved

101
00:05:21,790 --> 00:05:25,720
the animation up a bit so we can get all of these,

102
00:05:25,720 --> 00:05:29,260
set them here, and now put the animation back.

103
00:05:29,260 --> 00:05:31,570
Now, let's play this.

104
00:05:31,570 --> 00:05:33,130
Okay, very nice.

105
00:05:33,130 --> 00:05:35,410
I think it is a bit fast.

106
00:05:35,410 --> 00:05:37,450
Or maybe that's perfect.

107
00:05:37,450 --> 00:05:38,350
Let's see.

108
00:05:38,350 --> 00:05:40,590
I'll just make it a bit wider.

109
00:05:40,585 --> 00:05:41,745
Okay, great.

110
00:05:41,740 --> 00:05:43,660
I think that is enough.

111
00:05:43,660 --> 00:05:47,130
But I still think that 50 is a bit too much.

112
00:05:47,125 --> 00:05:51,305
Maybe let's make it 18 are no,

113
00:05:51,305 --> 00:05:54,175
save that. And animations.

114
00:05:54,170 --> 00:05:55,600
Let's play this.

115
00:05:55,595 --> 00:05:58,315
Okay, I think that is good enough.

116
00:05:58,310 --> 00:05:59,690
So I'm going to save this.

117
00:05:59,690 --> 00:06:02,270
I'm going to go into the assets,

118
00:06:02,270 --> 00:06:03,760
go to the prefabs,

119
00:06:03,755 --> 00:06:09,095
and I'm going to make this a prefix or the bullet impact now is a prefab.

120
00:06:09,095 --> 00:06:10,735
It's on the visit,

121
00:06:10,730 --> 00:06:14,660
the sprites are on the bullet layer and we have everything setup.

122
00:06:14,660 --> 00:06:18,710
I hope you did your best and creating this or if you didn't,

123
00:06:18,710 --> 00:06:21,980
I hope you followed along and I wasn't too fast for you.

124
00:06:21,980 --> 00:06:25,000
So now, what are we going to do?

125
00:06:24,995 --> 00:06:31,565
Now we need to instantiate this effect every time a bullet hits a wall.

126
00:06:31,565 --> 00:06:35,325
The way we do that is by issuing you a challenge.

127
00:06:35,320 --> 00:06:39,680
So your challenge is to instantiate the effect.

128
00:06:39,680 --> 00:06:42,980
So find your own impact effect if you need.

129
00:06:42,980 --> 00:06:45,650
So you can go through open game, our website,

130
00:06:45,650 --> 00:06:49,010
or through HIO or simply by searching on Google.

131
00:06:49,010 --> 00:06:50,840
Maybe if you're a good artist,

132
00:06:50,840 --> 00:06:53,810
you can create your own and get a reference

133
00:06:53,810 --> 00:06:57,160
to the impact on the bullet controller script.

134
00:06:57,155 --> 00:07:02,705
And make sure to instantiate the effect before the bullet gets stroke.

135
00:07:02,705 --> 00:07:08,615
So pause the video right now and go do the challenge.

136
00:07:08,615 --> 00:07:10,525
Okay, welcome back.

137
00:07:10,520 --> 00:07:13,540
So back in our player bullet in here,

138
00:07:13,535 --> 00:07:20,735
I'm going to create a reference to the serialized field to the bullet.

139
00:07:20,735 --> 00:07:23,815
Or it's going to be a game object,

140
00:07:23,810 --> 00:07:27,820
the bullet Impact effect.

141
00:07:27,815 --> 00:07:29,225
Save that.

142
00:07:29,225 --> 00:07:33,245
And what we'll do is before we

143
00:07:33,245 --> 00:07:37,585
destroy or get destroyed or before the bullet gets destroyed,

144
00:07:37,580 --> 00:07:44,020
we are going to instantiate the bullet Impact effect.

145
00:07:44,015 --> 00:07:46,855
And it's going to be where, where should it be?

146
00:07:46,850 --> 00:07:50,110
It's going to be on the transform position,

147
00:07:50,105 --> 00:07:55,685
the bullet tip, and the transform rotation of that bullet.

148
00:07:55,685 --> 00:07:57,925
So I'm going to save all of that.

149
00:07:57,920 --> 00:08:00,230
I'm going to go back in Unity.

150
00:08:00,230 --> 00:08:02,650
I'm going to choose the player bullet.

151
00:08:02,645 --> 00:08:04,795
Now we have an impact fact.

152
00:08:04,790 --> 00:08:06,350
We can add it right here.

153
00:08:06,350 --> 00:08:07,670
We can save that.

154
00:08:07,670 --> 00:08:11,950
We going to just check the enemy to 1 second.

155
00:08:11,945 --> 00:08:13,375
So what happens in here?

156
00:08:13,370 --> 00:08:16,010
Why are we so confident and creating this?

157
00:08:16,010 --> 00:08:18,960
And why there is a small problem.

158
00:08:18,964 --> 00:08:22,894
Still, what happens is as soon as we instantiated,

159
00:08:22,895 --> 00:08:27,425
you see that the default layer right here is the bullet hitting the wall.

160
00:08:27,425 --> 00:08:29,435
So immediately upon entry,

161
00:08:29,435 --> 00:08:32,465
we started bullet hitting walls, fact.

162
00:08:32,465 --> 00:08:34,835
So let's see how that works.

163
00:08:34,835 --> 00:08:39,075
Let me just remove this from here.

164
00:08:39,079 --> 00:08:41,169
Yeah, I think I can remove it.

165
00:08:41,165 --> 00:08:42,715
And one more thing I wanted to do,

166
00:08:42,710 --> 00:08:45,650
I've noticed that these Z was on 0,

167
00:08:45,650 --> 00:08:47,800
that me just reset all of these,

168
00:08:47,795 --> 00:08:50,995
save that, run the game.

169
00:08:50,990 --> 00:08:57,190
So now I should shoot a wall and upon impact you can see that there is an explosion,

170
00:08:57,185 --> 00:09:00,415
but for some reason you can see that it's still going.

171
00:09:00,410 --> 00:09:02,410
So if I have a lot of bullets,

172
00:09:02,405 --> 00:09:07,715
you'll notice that we have a lot of facts and none of them are going away.

173
00:09:07,715 --> 00:09:11,315
You can see it right here on the bullets impact on the wall.

174
00:09:11,315 --> 00:09:13,375
So what we're going to do,

175
00:09:13,370 --> 00:09:17,660
and that is because of the nature of the animation we've just created.

176
00:09:17,660 --> 00:09:19,520
If I go into the animations,

177
00:09:19,520 --> 00:09:21,310
if I go into the bullet,

178
00:09:21,305 --> 00:09:25,375
you can see right here that we have the controller and we have the animation.

179
00:09:25,370 --> 00:09:28,090
And I've told you previously a couple of videos

180
00:09:28,085 --> 00:09:30,875
ago when we were making the player animations,

181
00:09:30,875 --> 00:09:33,605
that there is this loop time right here.

182
00:09:33,605 --> 00:09:36,065
So I'm just going to remove it,

183
00:09:36,065 --> 00:09:38,335
save that, run the game.

184
00:09:38,330 --> 00:09:39,910
Should the bullet.

185
00:09:39,905 --> 00:09:43,195
There you go, it explodes on the wall.

186
00:09:43,190 --> 00:09:45,330
There you go.

187
00:09:46,090 --> 00:09:52,000
You can see right now that the impact is played only once,

188
00:09:51,995 --> 00:09:57,305
but there is a slight problem and that is that the bullet impacts

189
00:09:57,305 --> 00:10:02,745
on the wall are all still present and they are not being destroyed.

190
00:10:02,749 --> 00:10:05,949
So how are we going to fix that?

191
00:10:05,945 --> 00:10:10,235
And there is a very simple way of doing this.

192
00:10:10,235 --> 00:10:12,715
And while teaching you how to do this,

193
00:10:12,710 --> 00:10:17,840
I will show you an extremely effective tool inside of the animation.

194
00:10:17,840 --> 00:10:22,360
So what we're going to do is we're going to go into the assets.

195
00:10:22,355 --> 00:10:24,185
We're going to go to prefabs.

196
00:10:24,185 --> 00:10:26,935
We'll add the bullet Impact back. And here.

197
00:10:26,930 --> 00:10:32,170
And what we're going to do is we're going to go back assets, scripts,

198
00:10:32,165 --> 00:10:37,775
and create in here a new C-sharp script which will be the,

199
00:10:37,775 --> 00:10:45,395
let's see, impact, effect, destroyer.

200
00:10:45,395 --> 00:10:49,615
And it's going to be an extremely, extremely simple script.

201
00:10:49,610 --> 00:10:50,750
Let's hit Enter.

202
00:10:50,750 --> 00:10:54,320
And later on, I'm going to be reminded to put

203
00:10:54,320 --> 00:10:58,310
each script and a folder because as we go we'll have a lot more scripts.

204
00:10:58,310 --> 00:11:03,100
I'm going to add the impact effect destroyer.

205
00:11:03,095 --> 00:11:04,865
I'm going to open this up.

206
00:11:04,865 --> 00:11:11,135
I'm going to remove the start and update and I'm just going to do one method.

207
00:11:11,135 --> 00:11:15,795
And that is going to be a public void.

208
00:11:15,799 --> 00:11:20,439
Destroy. And what we're going to do,

209
00:11:20,435 --> 00:11:23,615
nope, not onDestroy, just destroy.

210
00:11:23,615 --> 00:11:31,295
And what we're going to do in here is we're going to simply destroy the game object.

211
00:11:31,295 --> 00:11:34,175
Great, how are we going to call this?

212
00:11:34,175 --> 00:11:36,785
Now, we could call this method from here,

213
00:11:36,785 --> 00:11:38,575
but that's not very effective.

214
00:11:38,570 --> 00:11:43,120
Why? Because when we instantiate the bulletin here,

215
00:11:43,115 --> 00:11:45,475
okay, let's just go through the logic.

216
00:11:45,470 --> 00:11:48,440
We instantiate the bullet upon impact,

217
00:11:48,440 --> 00:11:51,970
and then we destroy the game object,

218
00:11:51,965 --> 00:11:53,755
which is the bullet,

219
00:11:53,750 --> 00:11:57,070
because the player bullet controller is on the bullet.

220
00:11:57,065 --> 00:11:58,855
So the impact plates.

221
00:11:58,850 --> 00:12:01,370
So after we destroy this game object,

222
00:12:01,370 --> 00:12:04,610
we no longer have the player bullet controller.

223
00:12:04,610 --> 00:12:08,030
It is not available and we can demonstrate this.

224
00:12:08,030 --> 00:12:14,920
So I'm going to create this impact fact.

225
00:12:14,915 --> 00:12:18,875
So I just set the bullet created in here.

226
00:12:18,875 --> 00:12:21,055
And after we destroy the game object,

227
00:12:21,050 --> 00:12:23,240
I will try to get

228
00:12:23,240 --> 00:12:31,790
the impact effect dot get component and I'm going to access the impact destroyer.

229
00:12:31,790 --> 00:12:35,900
And from here I'm going to access the destroy.

230
00:12:35,900 --> 00:12:37,400
So this is the method.

231
00:12:37,400 --> 00:12:39,190
And now if I play my game,

232
00:12:39,185 --> 00:12:41,285
you'll notice that we will have an error.

233
00:12:41,285 --> 00:12:44,905
So I'm going to move this and make sure that you apply the changes.

234
00:12:44,900 --> 00:12:47,390
So all the bullet impact on the wall have

235
00:12:47,390 --> 00:12:51,250
this method and look what happens when we shoot in the console.

236
00:12:51,245 --> 00:12:52,325
There we go.

237
00:12:52,325 --> 00:12:53,155
What happens?

238
00:12:53,150 --> 00:12:55,090
We don't even see the impact.

239
00:12:55,085 --> 00:12:57,355
Why is that? Because we've been destroyed.

240
00:12:57,350 --> 00:13:02,210
And if we try to do this before we destroy the game object,

241
00:13:02,210 --> 00:13:03,280
let's look at this.

242
00:13:03,275 --> 00:13:04,645
Run the game.

243
00:13:04,640 --> 00:13:07,130
There we go. So there is no effect.

244
00:13:07,130 --> 00:13:09,740
It's being destroyed before we even see it.

245
00:13:09,740 --> 00:13:14,530
So I'm going to comment this out and we can keep this as it is.

246
00:13:14,525 --> 00:13:15,625
That's no problem.

247
00:13:15,620 --> 00:13:18,100
But I think I will remove this.

248
00:13:18,095 --> 00:13:20,875
And this will be for testing maybe later on you'll

249
00:13:20,870 --> 00:13:23,560
remember how we tried but didn't work out.

250
00:13:23,555 --> 00:13:27,815
So now we have the destroy method in here that destroys the game object.

251
00:13:27,815 --> 00:13:32,575
And how are we going to call this after we finish our animation,

252
00:13:32,570 --> 00:13:34,190
this is the tricky part.

253
00:13:34,190 --> 00:13:38,990
So now if I go to the animation while having the bullet impacts effect,

254
00:13:38,990 --> 00:13:41,740
I can play it and I see that at the end,

255
00:13:41,735 --> 00:13:44,545
you'll notice that when all the smoke is gone,

256
00:13:44,540 --> 00:13:46,660
we have nothing left to do.

257
00:13:46,655 --> 00:13:51,955
What we can do is in here we have this little key and here and I'm having,

258
00:13:51,950 --> 00:13:53,620
okay, so add an event.

259
00:13:53,615 --> 00:13:57,115
We can add an event at some point in the animation,

260
00:13:57,110 --> 00:14:01,240
and this will be crucial later on as we go through the course.

261
00:14:01,235 --> 00:14:03,955
I wasn't expecting to do the solo early,

262
00:14:03,950 --> 00:14:05,620
but no worries about that.

263
00:14:05,615 --> 00:14:07,525
We can add an event.

264
00:14:07,520 --> 00:14:09,470
And when we add an event,

265
00:14:09,470 --> 00:14:11,780
we see right here that we have animations,

266
00:14:11,780 --> 00:14:14,330
event and functions that we can choose from.

267
00:14:14,330 --> 00:14:15,790
And if we click on here,

268
00:14:15,785 --> 00:14:18,425
we see that we have the straw.

269
00:14:18,425 --> 00:14:20,335
Why do we have only to destroy?

270
00:14:20,330 --> 00:14:22,210
This is the destroy,

271
00:14:22,205 --> 00:14:24,055
which is right here.

272
00:14:24,050 --> 00:14:28,820
So what happens when we add an event too,

273
00:14:28,820 --> 00:14:32,570
the animation that we have on a certain object,

274
00:14:32,570 --> 00:14:38,320
we can access all the methods that are present of the public methods right here.

275
00:14:38,315 --> 00:14:40,795
And don't worry if you were a bit surprised on how we

276
00:14:40,790 --> 00:14:43,220
created this later on in the course,

277
00:14:43,220 --> 00:14:47,380
I'm going to go through every single step of creating methods.

278
00:14:47,375 --> 00:14:51,005
But for now, just know that we can access

279
00:14:51,005 --> 00:14:55,435
all the public methods that are available to us on the object.

280
00:14:55,430 --> 00:14:57,550
So what will happen now?

281
00:14:57,545 --> 00:14:59,795
As we play our animations,

282
00:14:59,795 --> 00:15:01,985
we will see the explosion,

283
00:15:01,985 --> 00:15:03,215
the puff of smoke.

284
00:15:03,215 --> 00:15:05,515
And when we get to the last frame,

285
00:15:05,510 --> 00:15:07,460
this event will be triggered,

286
00:15:07,460 --> 00:15:08,830
which is the destroyer.

287
00:15:08,825 --> 00:15:10,655
And what does this destroy do?

288
00:15:10,655 --> 00:15:14,855
It goes in here and it destroys the game object,

289
00:15:14,855 --> 00:15:17,665
which is holding the impact effect destroyer,

290
00:15:17,660 --> 00:15:20,120
which is the bullet impact on the wall.

291
00:15:20,120 --> 00:15:23,630
So make sure to apply all the changes and the override.

292
00:15:23,630 --> 00:15:26,530
I'm going to the lead the bullet Impact.

293
00:15:26,525 --> 00:15:28,795
I'm going to run the game.

294
00:15:28,790 --> 00:15:30,890
And when I shoot a wall,

295
00:15:30,890 --> 00:15:32,510
we should see the effect,

296
00:15:32,510 --> 00:15:34,820
but we don't. Why is that?

297
00:15:34,820 --> 00:15:36,320
Let's go back in here.

298
00:15:36,320 --> 00:15:38,050
Did we save these changes?

299
00:15:38,045 --> 00:15:39,475
Let's try this again.

300
00:15:39,470 --> 00:15:42,350
I think that's because we haven't saved the script.

301
00:15:42,350 --> 00:15:44,200
We run the game.

302
00:15:44,195 --> 00:15:45,655
We see the puff of smoke.

303
00:15:45,650 --> 00:15:46,390
And there you go.

304
00:15:46,385 --> 00:15:50,035
You can see that it has disappeared from the hierarchy.

305
00:15:50,030 --> 00:15:52,900
So now let's test this out a bit better.

306
00:15:52,895 --> 00:15:57,425
There you go, you can see the impact effect happening around us.

307
00:15:57,425 --> 00:16:00,595
And then the whole effect disappears.

308
00:16:00,590 --> 00:16:02,240
And it's much more effective.

309
00:16:02,240 --> 00:16:06,700
It's better than having a lot of game objects in our hierarchy,

310
00:16:06,695 --> 00:16:10,705
taking up space, taking up crucial RAM,

311
00:16:10,700 --> 00:16:12,680
and the clogging up the system.

312
00:16:12,680 --> 00:16:14,150
So I hope you enjoyed,

313
00:16:14,150 --> 00:16:16,790
I hope you are doing your best in each challenge.

314
00:16:16,790 --> 00:16:21,440
I hope you're enjoying the new things that we add every single time.

315
00:16:21,440 --> 00:16:23,630
I'm going to stage all of these.

316
00:16:23,630 --> 00:16:28,420
I'm going to say that added bullet Impact

317
00:16:28,415 --> 00:16:35,315
fact and destroyed it, destroyed afterwards.

318
00:16:35,315 --> 00:16:40,225
Using events with an exclamation mark,

319
00:16:40,220 --> 00:16:46,040
because this is, events are an incredible tool which you won't see very often people use.

320
00:16:46,040 --> 00:16:49,760
So I hope you enjoy it and I'll see you in the next video where we will

321
00:16:49,760 --> 00:16:53,480
be adding the trail effects to our bullets,

322
00:16:53,480 --> 00:16:57,060
hence, making organ much cooler.

