WEBVTT

00:00.040 --> 00:03.200
We will make the attack of this enemy two game object.

00:03.200 --> 00:07.480
So we're going to create a circle around this sort of this enemy game object.

00:07.480 --> 00:13.160
And if that circle collide with this player game object, this player gonna take the damage.

00:13.160 --> 00:17.040
So we're gonna basically do the same thing as we created the circle.

00:17.040 --> 00:20.440
We're gonna create in same way around this sword.

00:20.480 --> 00:21.440
So let's do that.

00:21.440 --> 00:26.600
So we're gonna open up our animator script, uh, and let's make a function for it.

00:26.600 --> 00:28.800
And we're going to make the function over here.

00:28.960 --> 00:29.280
We.

00:29.280 --> 00:30.760
You can make it anywhere.

00:31.120 --> 00:32.360
Uh, it's up to you.

00:32.720 --> 00:35.280
And make sure you just make that function public.

00:35.280 --> 00:35.680
Why?

00:35.720 --> 00:39.520
Because we're gonna call the function through animation event.

00:39.520 --> 00:45.040
So if I select my animator GameObject in the hierarchy, move over to animation tab and then click over

00:45.040 --> 00:47.880
here and then choose this Attack Animation clip.

00:47.880 --> 00:50.600
So we're going to call the function somewhere over here.

00:50.600 --> 00:53.600
So this is gonna be perfect time as you can see.

00:53.920 --> 00:58.720
Uh so we're going to call the function through animation event or through animation.

00:58.720 --> 01:02.450
So that's why we need to mark that function as a public function.

01:02.450 --> 01:07.850
So let's go to script and let's make a public, uh, public uh, fourth function.

01:07.850 --> 01:10.250
We're going to type void and we have to name the function.

01:10.250 --> 01:12.370
So I'm going to call it something like attack.

01:12.410 --> 01:15.370
Let's make first packet and some curly brackets.

01:15.530 --> 01:21.210
So what we want to do we just want to create the circle around that sort a game object.

01:21.210 --> 01:27.370
So we need a point from where we want to create the circle as well as we're going to need the radius

01:27.370 --> 01:28.370
of that circle.

01:28.370 --> 01:34.490
And then we what game object we really want to target or what uh, what game object or which game object

01:34.490 --> 01:36.210
we really want to damage.

01:36.210 --> 01:39.330
So in our case we're going to damage this player game object.

01:39.330 --> 01:42.050
So we need those variable one by one.

01:42.050 --> 01:43.570
So let's go to script.

01:43.570 --> 01:46.330
And for that let's go to the top of our class.

01:46.330 --> 01:48.530
And let's create those parameters.

01:48.530 --> 01:51.330
Basically we need to uh we need all of them.

01:51.330 --> 01:52.130
So that's why.

01:52.330 --> 01:54.650
So first thing we need our position.

01:54.650 --> 02:01.770
So let's create a public transform which responsible for position and we can simply call this one attack

02:01.770 --> 02:03.450
point or attack position.

02:03.450 --> 02:05.250
So I'm going to call it attack point.

02:05.250 --> 02:09.970
And the second thing we need or we need to specify the radius of that circle.

02:09.970 --> 02:12.930
So let's create another parameter that will be float.

02:12.930 --> 02:16.450
And we can simply call this one attack radius.

02:16.450 --> 02:20.330
And by default I'm going to give something like one unit or one app.

02:20.370 --> 02:25.130
And the third thing we need the layer mask or which game object we really want to target.

02:25.130 --> 02:31.330
So let's create a public layer mask and we can simply call it target layer or damage layer.

02:31.330 --> 02:34.490
Or simply we can call attack layer as well.

02:34.530 --> 02:37.010
I'm going to call it target layer, something like that.

02:37.250 --> 02:39.890
And let's press down Ctrl S to save script.

02:39.890 --> 02:41.210
And let's move to unity.

02:42.450 --> 02:45.210
So we need to assign those variable one by one.

02:45.210 --> 02:48.770
So the first thing we need a position from where we want to create.

02:48.770 --> 02:51.570
So we get a error.

02:51.570 --> 02:57.210
If we move over to console we can see we already a definition constraint target layer.

02:57.210 --> 02:58.860
So let's double click on this.

02:58.860 --> 03:03.140
Basically we already have a call parameter target layer as you can see.

03:03.140 --> 03:05.420
So I'm going to call this one something else.

03:05.420 --> 03:10.180
So I'm going to call it something like damage layer damage Layer.

03:10.380 --> 03:13.140
And let's press down Ctrl S to save script.

03:13.140 --> 03:15.100
And let's move to unity by now.

03:15.460 --> 03:21.540
So make sure you just don't create a multiple parameter in the same way.

03:21.540 --> 03:26.100
So you need to make it a little bit different than the other one.

03:26.100 --> 03:27.780
So make sure you just do that.

03:28.340 --> 03:32.380
And once we're done we just assign those variables one by one.

03:32.660 --> 03:33.820
So let's create the point.

03:33.860 --> 03:40.140
First we can see underneath our enemy two script attack point appears and it says none transform basically

03:40.180 --> 03:40.660
empty.

03:40.780 --> 03:42.860
So let's create a attack point first.

03:42.860 --> 03:45.300
So let's right click on this enemy two game object.

03:45.300 --> 03:47.860
And let's create an empty game object.

03:47.860 --> 03:50.940
And we can call this game object to something like attack point.

03:50.940 --> 03:53.220
So let's call it attack point.

03:53.220 --> 03:57.220
And I'm going to move this game object somewhere in the middle of the source.

03:57.220 --> 03:57.300
sauce.

03:57.300 --> 03:59.780
So let's select the move tool from our scene view.

03:59.780 --> 04:02.100
And I'm gonna move it somewhere around here.

04:02.460 --> 04:06.980
And I'm going to choose and gizmos for that.

04:06.980 --> 04:10.540
And now what we're going to do we're going to select our attack point.

04:10.540 --> 04:14.660
And let's drag it over to this attack point slot in enemy tool script.

04:14.780 --> 04:18.060
And the second thing we can see the radius and damage layer.

04:18.060 --> 04:19.180
And it says nothing.

04:19.180 --> 04:24.140
So we're going to choose our player layer and we assign it our player as a player layer.

04:24.140 --> 04:28.980
So before you choose the player make sure you assign this player game object as a player layer.

04:29.020 --> 04:36.020
As we have done with this enemy game object, basically we all we have done that thing uh, twice,

04:36.300 --> 04:40.420
uh, as we created the big circle and now it's fine.

04:40.860 --> 04:42.540
And let's go to script by now.

04:42.540 --> 04:48.020
But before we do, let's go to overheads and then click on Apply All and let's go to script by now.

04:48.180 --> 04:51.860
So let's move over to this physics, uh, basically this attack function.

04:51.860 --> 04:59.270
And let's use this physics 2D dot overlap circle function in order to create the circle overlap circle.

04:59.270 --> 05:04.830
And this over here, as a first argument, it's going to take the point or position from where we want

05:04.830 --> 05:05.910
to create the circle.

05:05.910 --> 05:10.310
So we're going to pass our attack point dot position at a point dot position.

05:10.310 --> 05:12.350
And the second thing it's going to take the radius.

05:12.350 --> 05:14.470
So we're going to pass our attack radius.

05:14.470 --> 05:20.430
And the third thing it's going to take the layer mask or which game object specific specifically we

05:20.430 --> 05:21.350
want to target.

05:21.350 --> 05:24.390
So in our case we're going to target the player.

05:24.390 --> 05:26.230
So we're going to pass damage layer.

05:26.230 --> 05:29.830
And we do know as a damage layer we have chosen the player.

05:29.830 --> 05:32.390
And make sure you just close that up with some my colon.

05:32.390 --> 05:38.390
So this function is going to be true or false or it's going to give us a true or false depending upon

05:38.590 --> 05:42.150
if this circle is really colliding with this player game object or not.

05:42.190 --> 05:47.270
If it's then it's going to give us a true value and it's going to give us a false value.

05:47.270 --> 05:52.870
So what we will do, we will store the result into a collider 2D variable because this is work like

05:52.870 --> 05:53.550
as a collision.

05:53.550 --> 05:58.790
So that's why we need to put it a variable called collider 2D or a container.

05:58.790 --> 06:01.310
So I'm going to create a collider 2D container.

06:01.310 --> 06:06.030
And we have to name the container or the variable where we want to store the result.

06:06.030 --> 06:08.470
So I'm going to call it something like call info.

06:08.790 --> 06:10.750
Uh sorry call info.

06:11.430 --> 06:12.150
Call info.

06:12.190 --> 06:13.990
Let's set equal to this.

06:13.990 --> 06:15.910
So this call info right over here.

06:15.910 --> 06:20.430
It can be true or false depending upon what this function returns us.

06:20.430 --> 06:23.350
So if the circle is really colliding with that player game object.

06:23.350 --> 06:25.590
So it's going to give us a true value.

06:25.590 --> 06:27.910
So that's why this call info is just going to be true.

06:27.910 --> 06:32.670
Because we're storing the result into this call info parameter as you can see.

06:32.710 --> 06:34.230
And we directly setting it.

06:34.230 --> 06:35.510
And if it's return false.

06:35.510 --> 06:38.030
So this over here it's going to be false.

06:38.030 --> 06:40.390
And let's suppose if the call info is true.

06:40.390 --> 06:41.230
So we're going to check.

06:41.230 --> 06:45.950
If so make first bracket and some curly brackets and what we want to check over here.

06:45.950 --> 06:48.910
We want to check if call info is true.

06:48.950 --> 06:53.630
Basically means the circle is really colliding with this player game object.

06:53.630 --> 06:54.880
Then what we need to do.

06:54.880 --> 06:57.400
We need to damage our player game object.

06:57.400 --> 06:59.920
So we're checking if call info is true.

06:59.960 --> 07:05.880
As you can see, since the circle is really colliding with our player game object, it means we need

07:05.880 --> 07:07.320
to damage our player.

07:07.320 --> 07:10.120
But before we do, let's print out a message for now.

07:10.120 --> 07:13.720
So we're going to type debug dot log in order to print out a message.

07:13.960 --> 07:15.680
And we're going to print out a message.

07:15.720 --> 07:21.880
Firstly we're going to take this are gonna use this call info or call information parameter to extract

07:21.920 --> 07:22.440
info.

07:22.480 --> 07:25.600
We can extract info something like the name of the game object.

07:25.600 --> 07:29.800
The circle collided with the tag and a component that we're looking for.

07:29.800 --> 07:30.880
Anything like that.

07:30.880 --> 07:34.080
So I'm going to use this call info parameter call info.

07:34.120 --> 07:36.400
Then I'm going to move to that game object.

07:36.400 --> 07:38.160
And I'm going to access the name.

07:38.160 --> 07:40.640
And top of that I'm going to add a custom message.

07:40.640 --> 07:43.160
So use this plus icon and then quotation.

07:43.160 --> 07:48.320
And I'm going to say something like takes damage takes damage.

07:49.240 --> 07:51.560
And let's close that up with semicolon.

07:52.000 --> 07:53.280
And now this is fine.

07:53.280 --> 07:56.770
And we can just press down Ctrl S to save our script.

07:57.090 --> 07:59.890
So I'm going to press Ctrl S to save my script.

07:59.890 --> 08:01.210
And let's move to unity.

08:01.450 --> 08:02.890
So this call info.

08:03.130 --> 08:05.410
Basically this call info we're using.

08:05.410 --> 08:10.850
Or you can simply say this call info dot GameObject basically means in our player GameObject.

08:10.850 --> 08:13.010
So we're gonna damage our player GameObject.

08:13.010 --> 08:18.170
So the over here call info dot GameObject means the circle collided with the GameObject.

08:18.170 --> 08:21.170
So the circle is just gonna collide with this player game object.

08:21.170 --> 08:24.170
So basically call info dot GameObject means the player.

08:24.170 --> 08:27.410
And then we accessing the name of the game object which is player.

08:27.410 --> 08:28.090
We do know.

08:28.090 --> 08:30.010
So this is gonna be player and player.

08:30.010 --> 08:33.090
Top of that we added a custom message takes damage.

08:33.090 --> 08:34.650
So player takes damage message.

08:34.650 --> 08:36.170
Just going to pop up right away.

08:36.170 --> 08:38.130
And now let's move over to unity.

08:38.290 --> 08:40.650
So we need to call the function as well.

08:40.650 --> 08:42.290
So we just made the function.

08:42.290 --> 08:44.210
We also need to call the function.

08:44.210 --> 08:46.410
So let's move over to animation tab.

08:46.410 --> 08:48.530
And we're going to choose the attack animation.

08:48.530 --> 08:52.490
And we're going to call the function over here somewhere like this.

08:52.490 --> 08:56.090
So this is going to be a perfect time to damage our player.

08:56.090 --> 08:57.810
So I'm going to call the function here.

08:58.090 --> 09:01.450
Uh, so in the left side in animation tab you can see Add event.

09:01.450 --> 09:04.690
So just click there and then choose this animation event.

09:04.690 --> 09:08.730
Then go over to Inspector and it says no function as you can see.

09:08.730 --> 09:13.610
So just click there and we're going to move over to anime to C Sharp Script or C sharp class.

09:13.610 --> 09:16.810
Then we will move over to methods basically means function.

09:16.810 --> 09:18.690
And then we're going to choose this attack.

09:18.810 --> 09:25.250
So basically what we're doing we're just going over to this anime to uh, class or this anime to C script.

09:25.250 --> 09:27.330
And then we just calling this function.

09:27.330 --> 09:33.370
And what this function is really doing is just printing out this message in the console, says player

09:33.370 --> 09:34.370
takes damage.

09:34.370 --> 09:36.770
So now let's move over to unity.

09:36.770 --> 09:40.410
But it would be nice if we able to see our circle.

09:40.410 --> 09:42.810
So we're going to use the uh another function.

09:42.810 --> 09:47.890
We do know we need to use a another function in order to be able to see our circle.

09:47.890 --> 09:49.210
So let's go to script now.

09:49.210 --> 09:54.700
And for that we're going to use this on draw Andrew Gizmo selected, so make sure you just include this

09:54.700 --> 09:59.140
function in order to draw your gizmos or the circle that you want to draw.

09:59.580 --> 10:01.300
So I already have included.

10:01.300 --> 10:02.940
So I'm going to draw the circle.

10:02.940 --> 10:09.460
So in order to draw we need to use this gizmos dot draw where sphere function.

10:09.460 --> 10:14.540
And this over here as a first argument it's going to take the position from where we want to draw the

10:14.540 --> 10:15.060
circle.

10:15.060 --> 10:17.820
So I'm going to pass our attack point dot position.

10:17.820 --> 10:20.020
And the second thing it's going to take the radius.

10:20.020 --> 10:24.020
So let's pass our attack radius and then close that up with semicolon.

10:24.020 --> 10:25.860
And I'm going to choose a color for that.

10:25.860 --> 10:30.180
So I'm going to set gizmo dot color equal to the color that you want.

10:30.220 --> 10:33.860
So I'm going to set color dot red something like that.

10:33.860 --> 10:36.300
But it will give us an error.

10:36.300 --> 10:42.100
So let's suppose you haven't dragged this attack point to this attack point slot underneath your enemy

10:42.140 --> 10:42.860
to escape.

10:42.860 --> 10:44.380
So this one is empty.

10:44.380 --> 10:48.860
But over here we can see this function will try to find the attack position.

10:48.860 --> 10:52.740
And it's going to draw this circle with this much of attack radius.

10:52.740 --> 10:56.540
And let's suppose you didn't assign it means that field is totally empty.

10:56.660 --> 11:00.620
Means we don't have we haven't assigned this attack position.

11:00.620 --> 11:04.260
So that's why it's gonna give us a error.

11:04.300 --> 11:09.300
Because it's not gonna able to find the attack position because it's totally empty.

11:09.340 --> 11:10.980
If you haven't assign it.

11:10.980 --> 11:15.820
So before we draw the circle, we need to make sure if we assign the attack point or not.

11:15.860 --> 11:19.380
If if not, then we need to stop drawing the circle.

11:19.380 --> 11:26.060
So before we draw the circle we're going to check if attack point is at sorry attack point.

11:26.340 --> 11:29.580
Attack point is equals equals to null.

11:29.780 --> 11:31.300
Equals equals to null.

11:31.540 --> 11:34.420
And if that is the case let's make some curly brackets.

11:34.420 --> 11:38.140
Means this attack point is empty means none.

11:38.140 --> 11:41.420
So in that situation we need to stop drawing.

11:41.420 --> 11:43.020
So that's why we're going to check.

11:43.260 --> 11:43.860
Oh sorry.

11:43.860 --> 11:45.340
We're going to type this return.

11:45.340 --> 11:51.390
And we do know after return whatever line of code we're gonna write it will not be executed means our

11:51.390 --> 11:53.230
circle will be stopped drawing.

11:53.390 --> 11:59.070
So firstly we check if attack point is null means that attack point fill is empty.

11:59.110 --> 11:59.950
Then we typing.

11:59.950 --> 12:04.670
Return means we're not going to able to draw our circle, but we do know we have assign it.

12:04.670 --> 12:07.550
So this condition over here is totally false.

12:07.550 --> 12:10.670
So that's why the circle will be draw right away.

12:10.670 --> 12:13.430
So now we're going to press Ctrl S to save our script.

12:13.430 --> 12:15.550
And let's move to unity by now.

12:15.550 --> 12:17.230
And let's have a look on this.

12:17.230 --> 12:22.950
And we need to adjust the radius of that circle as well around our attack position.

12:22.950 --> 12:29.150
So when I adjust the circle as how much this enemy GameObject sword is expanding.

12:29.590 --> 12:36.310
So we if we take a look and then choose this attack animation clip so we can see we need to just increase

12:36.310 --> 12:41.110
the size or the radius of the circle to fit around this attack.

12:41.110 --> 12:41.510
So.

12:42.030 --> 12:44.430
So let's select this and attack two.

12:45.470 --> 12:48.110
And I'm gonna increase the size so this much.

12:48.270 --> 12:52.120
And I'm gonna move this attack point somewhere in the middle of the sword.

12:52.160 --> 12:55.640
So let's select the attack point, and I'm going to move it somewhere around here.

12:55.880 --> 12:59.360
And we need to adjust the attack radius as well.

12:59.360 --> 13:03.680
So I'm going to shrink down something this much I guess it's fine.

13:03.680 --> 13:07.680
So I'm going to put 1.7 and this seems pretty much fine.

13:07.680 --> 13:11.640
Let's go to overrides apply all and I'm going to select my console tab.

13:11.640 --> 13:15.760
And let's click on this play button in the top in order to play our game.

13:15.800 --> 13:21.440
And let's have a look if this circle is really colliding with this player GameObject, not if it's then

13:21.440 --> 13:23.720
it's going to print out the message in the console.

13:23.720 --> 13:27.440
Says player takes damage because we're just calling the function there.

13:27.600 --> 13:28.640
So let's have a look.

13:28.880 --> 13:35.000
So as soon as this player GameObject just gonna get inside and we can see it's just attacking and we

13:35.000 --> 13:39.240
can see the message in the console getting pop up says player takes damage.

13:39.240 --> 13:43.640
So instead of printing out message what we're going to do we're going to damage our player.

13:43.640 --> 13:48.520
And we do know we just made a Takedamage function in this player game object.

13:48.520 --> 13:51.120
So we're going to call the function in our player script.

13:51.160 --> 13:57.240
And basically where uh, sorry, not player script in this anime script where this anime is just attacking

13:57.240 --> 13:59.360
on our player game object.

13:59.360 --> 14:04.120
So let's double click on this message and instead of printing out message, we're going to call the

14:04.120 --> 14:06.880
Takedamage function from that enemy script.

14:06.960 --> 14:10.880
Sorry, from that player or that player script.

14:11.040 --> 14:14.520
So let's remove this and let's uh call the function here.

14:14.520 --> 14:20.600
So we're going to use this call info parameter in order to extract information about the uh, game object

14:20.600 --> 14:22.120
the circle collided with.

14:22.120 --> 14:23.560
So we're going to go to call info.

14:23.560 --> 14:30.320
Firstly we will check if call info call info dot game object dot get component.

14:30.320 --> 14:34.720
And the component we're looking for is a uh enemy sorry player script.

14:34.720 --> 14:37.600
So we're going to pass player and then make first bracket.

14:37.600 --> 14:44.000
And we will check if this equal to not if that is not equal to null basically not empty.

14:44.280 --> 14:48.090
So firstly we're just using this uh call info GameObject.

14:48.090 --> 14:48.970
Call info.

14:49.010 --> 14:51.530
GameObject basically means player GameObject.

14:51.530 --> 14:52.890
So in our case player.

14:53.170 --> 14:58.610
And so we're using this call info parameter in order to extract information.

14:58.610 --> 15:04.130
So call info dot GameObject basically basically means the GameObject the circle collided with.

15:04.130 --> 15:09.250
So this circle or this attack circle just gonna collide with this player game object.

15:09.250 --> 15:12.450
So we basically moving over to this player game object.

15:12.450 --> 15:18.010
And then we're just going over to or just getting this player script as you can see in the inspector.

15:18.010 --> 15:21.610
So we're basically moving over to this player GameObject, this player script.

15:21.610 --> 15:26.970
And from this player Skip, we we're just calling this Takedamage function, as you can see.

15:27.010 --> 15:32.730
And we do know what we have done inside this Takedamage function in our player Skip.

15:32.730 --> 15:39.490
So we basically just going as you can see and we're checking if it's not equal to null means uh the

15:40.290 --> 15:44.450
means the player script attached uh attached to this player game object.

15:44.450 --> 15:44.930
Sorry.

15:44.970 --> 15:49.970
Uh, we not calling yet the Takedamage function, I really apologize.

15:50.130 --> 15:55.730
So we're just checking if the player is script not equal to null means this player script attached to

15:55.730 --> 15:57.170
this player GameObject.

15:57.170 --> 16:01.890
And we can see indeed this player script is attached to this player game object.

16:01.890 --> 16:05.290
So means the player game object is attached to player game object.

16:05.290 --> 16:10.370
So basically this line of code basically means the player script is attached to player script.

16:10.370 --> 16:17.290
And we're checking as you can see, if player script not equal to null means there is uh, means the

16:17.290 --> 16:21.210
player escape is attached to our player, uh, game object.

16:21.210 --> 16:25.810
So what we're gonna do now, we need to, uh, player game object, need to take the damage.

16:25.810 --> 16:29.050
So we're going to use this call info dot game object.

16:29.050 --> 16:30.650
And then we're going to get the component.

16:30.650 --> 16:32.850
And the component we're looking for is player.

16:32.850 --> 16:37.650
So we're going to type this player script or player class and then make first bracket.

16:37.650 --> 16:39.770
And then we're going to call the Takedamage function.

16:39.770 --> 16:44.210
So dot take damage and make first bracket and then close that up with semicolon.

16:44.210 --> 16:48.020
So we need to pass an argument in this Takedamage function.

16:48.020 --> 16:49.220
So I'm going to pass one.

16:49.580 --> 16:54.660
Uh, so basically what we're doing, we're just going over to this player game object, uh, subclass,

16:54.660 --> 16:56.420
as you can see in the inspector.

16:56.420 --> 17:00.740
And from there we just calling this Takedamage function, as you can see.

17:00.780 --> 17:04.540
And we do know, uh, what Takedamage function is really doing.

17:04.580 --> 17:11.220
It's just, uh, it just, uh, damaging our player or we're just subtracting from our player GameObject

17:11.220 --> 17:12.740
one unit of health.

17:12.780 --> 17:16.460
Because as a damage parameter, we pass one, as you can see.

17:16.500 --> 17:20.380
And now we're gonna press down Ctrl s in order to save our script.

17:20.380 --> 17:22.300
And now let's move over to unity.

17:22.620 --> 17:26.820
So we're going to select our player game object in order to see our max health.

17:26.820 --> 17:31.620
So the max health we can see underneath our player skip is five inches Inspector.

17:31.620 --> 17:37.580
So this max health is just going to shrink down once our enemy GameObject are gonna try to attack on

17:37.580 --> 17:39.060
this player GameObject.

17:39.060 --> 17:40.260
So let's have a look on this.

17:40.260 --> 17:46.540
So I'm going to click on this play button in the top and have a look on this as soon as this anime game

17:46.580 --> 17:50.060
object or this anime two or skeleton game object.

17:50.100 --> 17:52.980
I'm gonna take a attack on this player game object.

17:52.980 --> 17:58.060
This player game object is gonna take damage right away because we're calling the function there.

17:58.060 --> 17:59.100
So let's see.

17:59.140 --> 18:05.540
And as you can see, as soon as attacking we can see the max health is now zero of this player game

18:05.580 --> 18:05.980
object.

18:05.980 --> 18:07.780
It just loses all of his health.

18:07.780 --> 18:09.260
So I'm going to get out of play mode.

18:09.260 --> 18:12.780
And the message just getting pop up in the console says player type.

18:12.820 --> 18:17.940
Because once this player game object loses all of his health, then we're calling the type function.

18:17.940 --> 18:23.180
And in that type function we just printing out the message in the console says player type, as you

18:23.180 --> 18:25.740
can see underneath our console tab.

18:25.860 --> 18:27.300
So basically that is the thing.

18:27.300 --> 18:32.460
And make sure you just select the anime to game object, then move over to Inspector Overrides and then

18:32.460 --> 18:33.700
click on Apply All.

18:33.740 --> 18:39.180
If anything you just change it in this anime to script in underneath your Inspector tab.

18:39.500 --> 18:44.540
So make sure you just do that and I'm gonna press Ctrl S in order to save my project.
