Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:03,360 --> 00:00:04,890
How did you get on with that task?
2
00:00:05,250 --> 00:00:08,910
Hopefully now you can actually destroy the bat and the ghost.
3
00:00:09,000 --> 00:00:10,440
So let's take a look at what we've done.
4
00:00:10,860 --> 00:00:17,520
So on the bat, simply create a new tag called but the new town called Ghost, given the bat, the tiger
5
00:00:17,760 --> 00:00:20,400
bat and the box collider on there.
6
00:00:20,670 --> 00:00:22,050
Now the box Gladesville come in.
7
00:00:22,050 --> 00:00:23,850
Absolutely huge to begin with.
8
00:00:24,210 --> 00:00:30,630
So I'm using the value size of zero point zero three zero point zero five zero point to three.
9
00:00:31,230 --> 00:00:31,610
OK.
10
00:00:32,160 --> 00:00:34,200
And then the same for the ghost.
11
00:00:34,200 --> 00:00:35,880
The ghost, just the ghost.
12
00:00:35,880 --> 00:00:39,360
And the size of the box collider is zero point zero three.
13
00:00:40,080 --> 00:00:40,460
OK.
14
00:00:41,130 --> 00:00:43,320
And then in script.
15
00:00:45,770 --> 00:00:52,630
We simply have pretty much a duplicate of this, actually, so it transformed the competition, but
16
00:00:53,180 --> 00:00:59,520
it runs the dye trigger on the animation and then we start Coroutine called, but that's ghost.
17
00:00:59,900 --> 00:01:03,410
There's no animation, so we just simply start coroutine called ghost deaths.
18
00:01:04,070 --> 00:01:07,510
OK, be careful not to run your physics recast too many times.
19
00:01:07,520 --> 00:01:14,570
You only really need to call it once and then all of your checks to see what they hit can take place
20
00:01:14,570 --> 00:01:15,260
inside of there.
21
00:01:16,190 --> 00:01:22,160
OK, and then down here, we've got a enumerator death yield return and I've created a new wait for
22
00:01:22,160 --> 00:01:26,780
second called death time hit transform game object so that it falls.
23
00:01:26,900 --> 00:01:27,920
Same with the ghost.
24
00:01:28,220 --> 00:01:30,470
And I'm using that same death time.
25
00:01:30,740 --> 00:01:32,930
But so what I've done.
26
00:01:33,110 --> 00:01:34,100
Wait four seconds.
27
00:01:34,400 --> 00:01:36,730
But death time, do you wait for seconds?
28
00:01:37,610 --> 00:01:37,870
All right.
29
00:01:37,880 --> 00:01:40,410
Because they can be destroyed a lot quicker than the zombies.
30
00:01:40,640 --> 00:01:42,440
The zombie has a longer death on the machine.
31
00:01:43,430 --> 00:01:43,740
All right.
32
00:01:43,760 --> 00:01:45,460
That's so easy to others.
33
00:01:46,610 --> 00:01:52,460
And I will be nice when we actually kill one of these animals that we get some kind of particle effects
34
00:01:52,790 --> 00:01:53,720
to appear.
35
00:01:54,320 --> 00:01:55,010
And that's what we've got.
36
00:01:55,010 --> 00:02:02,210
This pack jamo assets, cartoon effects for the one that I want to use, first of all, is CFX three
37
00:02:03,110 --> 00:02:07,340
and Misk is CFX three skull explosion.
38
00:02:07,760 --> 00:02:09,240
Now, feel free to check them all out.
39
00:02:09,260 --> 00:02:10,160
See what they are.
40
00:02:10,250 --> 00:02:11,630
And choose your own if you want.
41
00:02:12,050 --> 00:02:14,360
But as I do, put this into the game world.
42
00:02:14,400 --> 00:02:15,770
You'll see what that looks like.
43
00:02:16,190 --> 00:02:16,490
All right.
44
00:02:16,490 --> 00:02:17,150
Quite nice.
45
00:02:18,410 --> 00:02:21,110
Now we can see it's actually made up of multiple elements.
46
00:02:21,560 --> 00:02:25,340
Each one of these elements is going to have its own shader.
47
00:02:25,820 --> 00:02:26,060
All right.
48
00:02:26,060 --> 00:02:28,880
Now the cartoon effects, particle additives.
49
00:02:29,370 --> 00:02:34,520
But it is going to add to your draw calls volitionally.
50
00:02:35,270 --> 00:02:36,500
But not not too bad.
51
00:02:36,620 --> 00:02:42,560
I mean, like say as long as we can stay below a thousand draw calls, we should be perfectly fine and.
52
00:02:43,910 --> 00:02:50,390
Now, on your particle effects, obviously it's got a lot of parameters, one of which is a script that
53
00:02:50,390 --> 00:02:54,500
says auto destruct that will basically destroy after a certain amount of time.
54
00:02:55,310 --> 00:03:00,230
What we want to do is only deactivate basically just switches it off until it's called again.
55
00:03:00,980 --> 00:03:07,640
And this is for optimization purposes and it's brilliant for mobile devices means that we don't have
56
00:03:07,640 --> 00:03:14,780
to keep Spolin in new particle effects, which we use the same one over and over again and show this
57
00:03:14,780 --> 00:03:17,340
as play in the wake checked, which we should do.
58
00:03:17,360 --> 00:03:19,670
And we're just going to switch this off to begin with.
59
00:03:20,330 --> 00:03:26,600
We simply just going to switch it on and off as when needed, getting us to game object, create empty
60
00:03:27,140 --> 00:03:36,650
all this particle X so we can keep all of these in place and then drag this one onto that object.
61
00:03:38,890 --> 00:03:41,230
And yeah.
62
00:03:41,560 --> 00:03:42,700
All right, that's perfectly fine.
63
00:03:43,240 --> 00:03:45,520
And think of this almost like folder.
64
00:03:45,910 --> 00:03:46,750
I can just close.
65
00:03:47,050 --> 00:03:52,000
Also, if we can keep all of these items together, basically means that they're going to render in
66
00:03:52,000 --> 00:03:52,810
sequence.
67
00:03:52,930 --> 00:03:58,210
So was going to speed up the process as they are very similar types.
68
00:03:58,630 --> 00:04:03,820
Each time that it goes through, I mean, it has to go through the hierarchy and order anyway.
69
00:04:04,180 --> 00:04:07,990
Well, let's say that we have the possible effects and then we have the ghost and then we have particle
70
00:04:07,990 --> 00:04:09,250
effects and then we have the bat.
71
00:04:09,730 --> 00:04:17,680
Well, these particle effects of a shader of cartoon effects, and these ones have a different shader.
72
00:04:19,800 --> 00:04:23,860
OK, if I can find it, this one, those mobile particles additive.
73
00:04:24,190 --> 00:04:28,540
Well, each time it goes through here, it's basically switching these shaders over.
74
00:04:28,930 --> 00:04:33,910
So if you can keep objects together, share the same shaders, means it doesn't have to keep switching
75
00:04:33,910 --> 00:04:34,900
negotiators around.
76
00:04:35,350 --> 00:04:37,450
So it's going to make it much faster to render.
77
00:04:37,780 --> 00:04:38,110
All right.
78
00:04:38,170 --> 00:04:44,020
It's going to take a lot of stress off of the processor and the graphics card.
79
00:04:45,220 --> 00:04:50,170
Now, all we need to do is basically move these particle effects to wherever I hit, took place, whichever
80
00:04:50,170 --> 00:04:51,190
object we hit.
81
00:04:51,760 --> 00:04:59,530
OK, so in our script I'm going to do beneath a shooting is we're going to say particles.
82
00:05:01,960 --> 00:05:05,170
So we need a public game object.
83
00:05:05,960 --> 00:05:08,740
Simply call zombie particles.
84
00:05:13,020 --> 00:05:22,050
And in our shoot, what we're going to do if we've hit the zombie just before we start a routine, we're
85
00:05:22,050 --> 00:05:25,340
actually going to switch on the zombie particles.
86
00:05:25,440 --> 00:05:29,310
So zombie particles dot.
87
00:05:34,110 --> 00:05:41,490
Well, actually, let's move them first transform got position equals the hit that transformed opposition,
88
00:05:43,560 --> 00:05:46,380
move them into place and then we can switch them on.
89
00:05:46,560 --> 00:05:48,240
So some zombie particle's.
90
00:05:49,620 --> 00:05:50,940
So seductive.
91
00:05:52,830 --> 00:05:53,150
True.
92
00:05:56,460 --> 00:05:56,900
OK.
93
00:05:57,070 --> 00:06:01,800
And now you might be wondering, for example, on this one, our viewers hit or transformed up game
94
00:06:01,800 --> 00:06:02,210
objects.
95
00:06:02,220 --> 00:06:04,350
I like to focus in on this one.
96
00:06:04,350 --> 00:06:05,700
I've just use zombie particles.
97
00:06:05,860 --> 00:06:09,750
So, Dr. Drew, why have I use two different systems?
98
00:06:10,140 --> 00:06:15,270
OK, well, on this one, the hit is actually the collider.
99
00:06:15,510 --> 00:06:17,800
So if I just simply do hits seductive?
100
00:06:17,940 --> 00:06:19,110
True or false?
101
00:06:19,440 --> 00:06:21,090
Or it's going to do is switch off a collider.
102
00:06:21,600 --> 00:06:27,870
So in this one, they have to access its transform and then its parent game object and set that to false.
103
00:06:28,260 --> 00:06:32,970
Whereas on this to some B particles have been brought in as a game object.
104
00:06:33,630 --> 00:06:38,790
So by doing so active on that, I know I'm switching off the entire game object.
105
00:06:40,350 --> 00:06:40,740
OK.
106
00:06:41,130 --> 00:06:43,690
However, I don't want those particles to remain on forever.
107
00:06:43,710 --> 00:06:45,990
So as part of my zombie death.
108
00:06:46,890 --> 00:06:51,750
OK, and I'm going to simply switch those off after.
109
00:06:52,800 --> 00:06:54,120
Oh, actually, no, wait a second.
110
00:06:54,120 --> 00:06:54,600
Wait a second.
111
00:06:54,660 --> 00:06:56,980
The script should do that for me.
112
00:06:57,000 --> 00:06:57,780
That's what this does.
113
00:06:58,080 --> 00:07:00,260
Auto destruct only deactivate.
114
00:07:00,270 --> 00:07:04,470
So after the animation is played, that will automatically switch the particles off.
115
00:07:05,190 --> 00:07:05,560
All right.
116
00:07:05,560 --> 00:07:06,120
So that's good.
117
00:07:06,990 --> 00:07:07,830
Let's try this.
118
00:07:07,950 --> 00:07:08,910
Just for the zombie.
119
00:07:18,640 --> 00:07:21,640
Oh, I know why I love Red ever.
120
00:07:22,250 --> 00:07:23,770
Oh, no, actually, I haven't.
121
00:07:23,830 --> 00:07:24,790
OK, that's interesting.
122
00:07:25,390 --> 00:07:28,030
I forgot to include the particles.
123
00:07:28,390 --> 00:07:28,810
All right.
124
00:07:29,560 --> 00:07:30,500
I'm going to have.
125
00:07:32,770 --> 00:07:34,680
Well, perhaps I forgot to save.
126
00:07:35,080 --> 00:07:41,800
OK, just make sure that you do safe, this one that has got Asterix shows with all that work that just
127
00:07:42,280 --> 00:07:43,210
hasn't been assigned.
128
00:07:43,660 --> 00:07:46,060
So fail safe, OK?
129
00:07:46,390 --> 00:07:51,370
Now, as it compiles, I should have an empty game slot on my main.
130
00:07:55,590 --> 00:07:57,950
We go right to the bottom zombie particles.
131
00:07:58,220 --> 00:08:01,010
So now I can drag this skull explosion into that.
132
00:08:01,460 --> 00:08:01,800
All right.
133
00:08:01,820 --> 00:08:03,140
Now let's see what happens.
134
00:08:09,490 --> 00:08:11,590
OK, and we can see those nice particle effects.
135
00:08:12,310 --> 00:08:13,060
Excellent.
136
00:08:13,510 --> 00:08:13,900
OK.
137
00:08:14,370 --> 00:08:19,270
And so now it's just a case of setting up all of the other particle effects.
138
00:08:19,840 --> 00:08:26,830
And so the ones that I quite like, as I say, choose your own for the bats.
139
00:08:26,920 --> 00:08:31,780
I quite like the anime deaths.
140
00:08:32,970 --> 00:08:36,910
So this one as if I drag this one into the game world.
141
00:08:37,120 --> 00:08:37,990
You can see this.
142
00:08:38,020 --> 00:08:38,350
All right.
143
00:08:38,350 --> 00:08:39,250
I think that's quite nice.
144
00:08:39,780 --> 00:08:41,470
Oh, this one has a light.
145
00:08:41,770 --> 00:08:43,870
OK, I definitely don't recommend the light.
146
00:08:44,840 --> 00:08:47,120
So let's get rid of that in order to get rid of it.
147
00:08:47,140 --> 00:08:49,210
We need to first break the pref up.
148
00:08:49,370 --> 00:08:50,830
So right click prefab.
149
00:08:51,130 --> 00:08:52,210
Unpack completely.
150
00:08:52,780 --> 00:08:54,460
Then we can get rid of this light.
151
00:08:54,850 --> 00:09:02,050
Let's get rid of that inner glow and scroll and smoke circles.
152
00:09:02,290 --> 00:09:04,660
Any one of these you can get rid of if you want it.
153
00:09:05,080 --> 00:09:05,440
All right.
154
00:09:05,740 --> 00:09:07,000
Let's just see what we've got now.
155
00:09:07,810 --> 00:09:09,460
Yeah, quite like that.
156
00:09:10,270 --> 00:09:13,330
And only one to deactivate this.
157
00:09:13,840 --> 00:09:17,710
And it is play on the week.
158
00:09:17,920 --> 00:09:18,250
All right.
159
00:09:18,550 --> 00:09:23,500
So I'm just going to switch this one off and drag that onto the particle effects.
160
00:09:24,700 --> 00:09:28,390
So now I just need to add this to my script.
161
00:09:28,750 --> 00:09:31,750
So this is going to be a probably game object
162
00:09:34,570 --> 00:09:37,270
called bat particles.
163
00:09:40,330 --> 00:09:48,220
And then I simply I'm just going to copy these two lines, control and see do the same on the back to
164
00:09:48,230 --> 00:09:53,420
control and be this time instead of zombie particles, I simply do, but particles.
165
00:09:57,860 --> 00:09:58,310
Here we go.
166
00:09:58,610 --> 00:09:59,030
All right.
167
00:09:59,390 --> 00:10:03,230
And then for the ghost, let me just make sure I save that.
168
00:10:07,680 --> 00:10:11,010
For the ghost, I'm choosing some sparks.
169
00:10:11,280 --> 00:10:16,920
OK, so this is CFX four and sparks explosions.
170
00:10:16,980 --> 00:10:18,090
You see what this looks like.
171
00:10:18,390 --> 00:10:18,780
All right.
172
00:10:18,810 --> 00:10:19,620
Nice and easy.
173
00:10:20,320 --> 00:10:23,310
And this one just does one element in.
174
00:10:23,460 --> 00:10:24,780
All right, which is fantastic.
175
00:10:25,260 --> 00:10:29,220
Only the activate and does play in the weeks on.
176
00:10:29,220 --> 00:10:31,240
Just simply going to switch this one off to begin with.
177
00:10:31,890 --> 00:10:34,020
Track this onto the particle effects.
178
00:10:35,550 --> 00:10:36,990
Let's now at this.
179
00:10:39,440 --> 00:10:41,200
Public game objects.
180
00:10:41,600 --> 00:10:44,990
And we have, uh, ghost particles.
181
00:10:48,570 --> 00:10:55,920
So once again, I can just copy these two elements, control and see before I run the curtain.
182
00:10:56,610 --> 00:10:58,860
Simply change this to ghost particles.
183
00:11:05,170 --> 00:11:05,950
Excellent.
184
00:11:06,010 --> 00:11:07,870
All right, so now I can save this.
185
00:11:09,750 --> 00:11:12,120
And just out these particles to the script.
186
00:11:15,610 --> 00:11:18,870
So on the ground, we now have two empty game slots.
187
00:11:19,030 --> 00:11:23,830
One of them is the enemy death skull and the other one is the Sparks explosion.
188
00:11:25,390 --> 00:11:27,010
All right, time to check this out now.
189
00:11:32,470 --> 00:11:34,590
So maybe killed about that.
190
00:11:35,290 --> 00:11:35,860
Here we go.
191
00:11:37,240 --> 00:11:37,980
Kill the ghost.
192
00:11:39,780 --> 00:11:43,200
He disappears and obviously the zombie.
193
00:11:44,910 --> 00:11:45,660
All right, excellent.
194
00:11:45,960 --> 00:11:51,990
Yep, so we've got all sorts of interesting political effects going on as well now as a little bit of
195
00:11:51,990 --> 00:11:52,560
tusk.
196
00:11:52,590 --> 00:11:58,110
I would recommend going back into your profiler and taking a look at the changes that have happened
197
00:11:58,110 --> 00:12:00,120
as a result of adding all these extra elements.
198
00:12:00,750 --> 00:12:05,760
Just take a look at the performance overall and how it's affected your frames per second.
199
00:12:06,180 --> 00:12:09,690
Hopefully there's been almost no change whatsoever.
200
00:12:09,990 --> 00:12:15,360
Hopefully it's very, very mind you, and your frames per second should still be extremely high on the
201
00:12:15,360 --> 00:12:15,930
computer.
16847
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.