WEBVTT

00:00.000 --> 00:01.840
Right now what we want to do.

00:01.880 --> 00:05.600
We basically want to create a circle around our attack.

00:05.600 --> 00:11.520
So if I select my player GameObject in the hierarchy, move over to the animation tab and then select

00:11.520 --> 00:12.400
any attack.

00:12.440 --> 00:14.000
Let's suppose this attack to.

00:14.200 --> 00:16.960
So as you can see we're just attacking.

00:16.960 --> 00:20.520
So around this I just want to create a circle.

00:20.520 --> 00:25.720
And if that circle collides with any enemy GameObject then we cannot damage it.

00:25.760 --> 00:27.280
Since we don't have enemy.

00:27.320 --> 00:29.080
Let's create a square for now.

00:29.080 --> 00:32.440
And later on we're gonna replace that with enemy sprite.

00:32.440 --> 00:33.480
So let's do it.

00:33.480 --> 00:36.160
So what we will do first let's create that.

00:36.280 --> 00:39.240
To create it we will move over to our hierarchy.

00:39.280 --> 00:41.520
Let's right click or hit this plus icon.

00:41.520 --> 00:45.120
Then go to 2D Object Sprites and then choose this square.

00:45.120 --> 00:49.440
And let's call this square for now enemy enemy.

00:49.720 --> 00:57.160
And make sure you go to Inspector and uh, basically uh, add a component box Collider 2D.

00:57.160 --> 01:01.610
So we're gonna take our collision and I'm gonna to drag a little bit down.

01:01.610 --> 01:04.450
So let's select the move tool from here in this in view.

01:04.450 --> 01:06.130
And let's move it up here.

01:06.370 --> 01:10.770
And let's add a box Collider 2D for collision detection.

01:10.770 --> 01:12.970
So let's click on this add component.

01:12.970 --> 01:16.170
And let's add box Collider 2D by searching it.

01:16.170 --> 01:19.050
And let's hit enter in order to attach that.

01:19.050 --> 01:23.370
And now what we will do we will assign this enemy as a enemy here.

01:23.370 --> 01:27.050
So player just gonna detect that this is our enemy.

01:27.050 --> 01:30.050
So we need to assign this enemy as a enemy layer.

01:30.050 --> 01:31.330
So how you can do it.

01:31.330 --> 01:35.130
Go over to Inspector in the top right you can see layer default.

01:35.130 --> 01:36.210
So let's click on it.

01:36.210 --> 01:38.010
Let's click on Add Layer.

01:38.010 --> 01:40.530
And let's create a new layer for this enemy.

01:40.650 --> 01:43.770
And we're going to call this enemy something like that.

01:43.770 --> 01:48.050
And make sure you select your enemy GameObject in the hierarchy one more time.

01:48.090 --> 01:54.210
Go over to Inspector and Layer default to set whatever you recently created.

01:54.250 --> 01:57.330
Now we assign it this enemy as enemy layer.

01:57.370 --> 01:57.850
Basically.

01:57.850 --> 02:02.700
Now this player just gonna assume that this is our enemy.

02:02.700 --> 02:06.860
So let's create the circle around our attack position.

02:06.860 --> 02:10.660
Basically, if I select my player, move over to animation tab.

02:10.660 --> 02:12.820
We're playing the attack animation clip.

02:12.820 --> 02:16.340
So we will create a point up here, something over here.

02:16.460 --> 02:19.260
And around that point we will create the circle.

02:19.260 --> 02:24.180
And if that circle collide with this enemy then we're gonna damage this enemy.

02:24.180 --> 02:27.220
So let's open up our script by double clicking on it.

02:27.220 --> 02:32.020
And for that we're gonna use a function it a function.

02:32.020 --> 02:36.060
So let's make that function somewhere around here.

02:36.060 --> 02:38.140
You can make it anywhere you like.

02:38.340 --> 02:44.380
And we will make this function public because we're gonna call this function through animation event.

02:44.420 --> 02:50.620
Basically once this our player game object playing animation, we're gonna call it somewhere around

02:50.620 --> 02:51.100
here.

02:51.380 --> 02:55.900
Uh, we're gonna talk about it later, but make sure you just make that function public.

02:55.900 --> 02:57.540
So that is the reason.

02:57.540 --> 02:59.640
So we're going to make this function public.

02:59.840 --> 03:02.440
And for function we need to use this void.

03:02.560 --> 03:04.440
And we have to name the function.

03:04.560 --> 03:07.080
So let's call this function something like attack.

03:07.120 --> 03:09.960
And let's make first bracket and some curly brackets.

03:10.120 --> 03:17.920
And in order to create a circle around that point we basically have to use this physics 2D physics 2D

03:17.960 --> 03:20.120
dot overlap circle.

03:20.560 --> 03:22.840
We already use this function.

03:22.920 --> 03:26.880
Uh, I guess so basically the same way we're going to do it.

03:26.880 --> 03:32.000
So this physics 2D physics 2D dot overlap circle is just going to create the circle.

03:32.160 --> 03:37.360
So as a first argument it's going to take the point from where you want to create the circle or the

03:37.360 --> 03:38.160
position.

03:38.160 --> 03:40.520
And the second thing it's going to take the radius.

03:40.520 --> 03:46.280
And the third argument it's going to take the layer mask basically which game object you want to damage.

03:46.280 --> 03:49.400
So we need to assign those variable before we create.

03:49.400 --> 03:53.200
So let's make uh, this uh comment by double forward slash.

03:53.200 --> 03:56.400
And let's go to top of our class and let's assign.

03:56.400 --> 03:58.410
So I'm going to do it over here.

03:58.410 --> 04:01.050
So let's give it a title to make it nice.

04:01.050 --> 04:08.770
So we have to type this header and let's say in title attack since this just gonna have attack.

04:08.770 --> 04:09.610
So the first thing.

04:09.610 --> 04:13.090
So let's create a serialized field uh private.

04:13.290 --> 04:17.690
And this will be transform or simply you can, uh, transform.

04:17.690 --> 04:24.050
We do know it's responsible for position and we can call this one to something like attack point or

04:24.050 --> 04:25.210
attack position.

04:25.210 --> 04:27.370
And the second thing, we need the radius.

04:27.370 --> 04:30.570
So let's make a another serialized field private.

04:30.770 --> 04:32.490
And that will be float.

04:32.490 --> 04:37.170
And we can call this one attack radius attack radius.

04:37.170 --> 04:39.490
And by default I'm going to set one f.

04:39.770 --> 04:42.130
And third argument we need the layer mask.

04:42.130 --> 04:45.370
So let's create another serialized field private.

04:45.610 --> 04:47.570
And this will be layer mask.

04:47.930 --> 04:53.570
Uh basically which game object we want to target so we can call it target layer or attack layer.

04:53.570 --> 04:58.460
So I'm going to call it something like what is player A?

04:58.460 --> 05:00.340
And let's close that off with semicolon.

05:00.340 --> 05:03.180
And we're going to press down Ctrl S to save our script.

05:03.180 --> 05:05.140
And now let's move over to unity.

05:05.140 --> 05:08.340
So we need to assign those variables one by one.

05:08.340 --> 05:12.020
So the first thing just going to pop up our title which will be attack.

05:12.020 --> 05:13.740
And after that those variable.

05:13.740 --> 05:17.020
So the first thing just going to pop up our attack point.

05:17.020 --> 05:22.380
So we need to create our attack point from where we just want to create our circle.

05:22.580 --> 05:24.700
And the second thing gonna be radius.

05:24.700 --> 05:28.220
And the third argument is going to be uh, the layer mask.

05:28.220 --> 05:34.980
And as a layer mask we're going to choose enemy since we want to damage our enemy game object once our

05:34.980 --> 05:37.620
player game object, uh, attack on enemy.

05:37.980 --> 05:45.460
So we can see as soon as our player scape gets compile attack point and it says none transform basically

05:45.500 --> 05:46.020
empty.

05:46.060 --> 05:47.900
So let's create attack point.

05:48.060 --> 05:49.420
Uh, attack point.

05:49.540 --> 05:51.700
Uh, inside this player game object.

05:51.700 --> 05:57.070
So let's right click on this player game object and let's create an empty game object.

05:57.070 --> 06:02.070
And we can call this game object to something like attack point or attack position.

06:02.070 --> 06:03.630
So let's call it attack point.

06:03.910 --> 06:06.150
And I'm going to choose an gizmos for it.

06:06.150 --> 06:07.430
Let's go over to Inspector.

06:07.430 --> 06:10.150
Click here and we're going to choose this one.

06:10.150 --> 06:11.030
And let's move it.

06:11.030 --> 06:14.030
Something over here in the center of attack.

06:14.030 --> 06:17.270
So basically if we want to play the attack to.

06:17.550 --> 06:24.510
So we just want to move it in center something over here it's going to be centered I guess this is fine.

06:24.710 --> 06:27.870
And once it's fine that's pretty cool.

06:27.910 --> 06:32.470
Now let's select our attack point and let's drag it over to this attack point field.

06:32.470 --> 06:34.510
And the second thing which is radius.

06:34.510 --> 06:36.270
So I'm going to leave it to one.

06:36.270 --> 06:39.590
And what is layer uh what is layer I'm gonna choose.

06:39.710 --> 06:42.550
Uh, this sorry I really apologize.

06:42.590 --> 06:44.710
Instead of calling what is player.

06:44.750 --> 06:48.190
We we basically have to call it what is enemy.

06:48.230 --> 06:50.870
Since we damaging our enemy game object.

06:51.070 --> 06:53.390
I really, really apologize for this.

06:53.390 --> 06:58.130
Now I'm going to press down Ctrl s on one more time in order to save my project.

06:58.130 --> 06:58.530
Sorry.

06:58.570 --> 06:59.730
Save my script.

06:59.730 --> 07:01.090
And what is enemy?

07:01.090 --> 07:02.250
I'm gonna choose enemy.

07:02.290 --> 07:09.770
But before you choose enemy, make sure you assign your enemy game object as enemy layer by as we have

07:09.770 --> 07:11.010
done previously.

07:11.010 --> 07:13.210
So you can just follow the same path.

07:13.210 --> 07:18.250
So now underneath our attack title, we should see what is enemy.

07:18.290 --> 07:19.850
Now I'm gonna choose enemy.

07:19.850 --> 07:22.490
So we're gonna damage this enemy game object.

07:22.530 --> 07:27.570
Now we assign it all of this variable and we are ready to create our circle.

07:27.570 --> 07:32.250
So let's go to our script and let's move over to our add function.

07:32.250 --> 07:34.890
And let's remove this two forward slash.

07:34.890 --> 07:39.810
So this physics 2D dot overlap circle as a first argument it's gonna take the point.

07:39.810 --> 07:42.210
So we will pass our attack point.

07:42.210 --> 07:44.330
And we're going to access the position.

07:44.330 --> 07:46.130
So we will type dot position.

07:46.130 --> 07:47.970
Second thing it's gonna take the radius.

07:47.970 --> 07:50.330
So let's pass our attack radius.

07:50.330 --> 07:53.380
And the third argument it's going to take the layer mask.

07:53.420 --> 07:56.100
As a layer mask, we're going to choose what is enemy.

07:56.140 --> 07:59.700
Since we want to damage our enemy and what is enemy?

07:59.740 --> 08:03.660
We have chosen enemy, and now we're going to close that off with semicolon.

08:03.660 --> 08:06.220
So this physics 2D dot overlap circle.

08:06.540 --> 08:11.180
It's going to create the circle from our attack position with this much of radius.

08:11.180 --> 08:14.180
And it's going to damage our enemy as you can see.

08:14.500 --> 08:21.260
So if this circle really collide that we created with one radius, with our attack radius, if that

08:21.260 --> 08:26.500
circle really collide with this enemy game object, then this function over here, it's going to give

08:26.540 --> 08:27.420
a true value.

08:27.460 --> 08:29.900
Else it will give us a false value.

08:29.900 --> 08:34.700
If the circle is not colliding with this enemy game or game object.

08:34.780 --> 08:41.980
So what we have to do, uh, we're going to store the result into a collider 2D since this is a just

08:41.980 --> 08:43.460
going to work as collision.

08:43.460 --> 08:50.300
So we're gonna store it into a collider 2D variable and let's call it call info or collision information.

08:50.300 --> 08:53.430
You can simply say, and let's set equal to this.

08:53.430 --> 09:00.310
So this call info can be true or false depending upon if the circle is really colliding with this enemy

09:00.310 --> 09:01.390
game object or not.

09:01.430 --> 09:03.990
If it's, then this function is just going to be true.

09:03.990 --> 09:09.990
So this call info will be true since we're storing the result into this call info variable.

09:10.030 --> 09:12.590
As you can see right over here.

09:12.830 --> 09:19.910
So what we will do for now, let's print out a message as something like says that we damaging enemy.

09:20.070 --> 09:23.790
So what we will do in the next line we will check if.

09:24.030 --> 09:26.670
Let's make first bracket and some curly brackets.

09:26.710 --> 09:30.190
We want to check if our call info is true.

09:30.710 --> 09:37.430
Call sorry call info if it's equals equals to true or we can just leave it like this.

09:37.470 --> 09:42.830
It's basically means true means the circle is really colliding with this enemy game object.

09:42.830 --> 09:45.230
So in this situation we need to damage it.

09:45.230 --> 09:48.750
So let's uh for now let's print out a message.

09:48.750 --> 09:53.600
So for printing out we're going to type this debug dot log debug dot log.

09:53.800 --> 10:02.920
And we can say something like, uh, damaging, uh, or let's suppose say circle circle colliding,

10:03.320 --> 10:07.880
uh, colliding with width and the name of the game object.

10:07.880 --> 10:15.680
So top of that plus icon where, uh, we can use this plus icon in order to, uh, in order to add a

10:15.720 --> 10:19.800
top message or basically in order to add a another message.

10:19.800 --> 10:25.320
So I'm going to use this call info, since we are storing all of the information into this call info

10:25.320 --> 10:28.560
so we can extract information by this parameter.

10:28.600 --> 10:30.160
This call info parameter.

10:30.320 --> 10:34.720
Like we can extract information the game object the circle collided with.

10:34.720 --> 10:37.760
So the circle is just going to collide with that enemy game object.

10:37.760 --> 10:41.880
So we can extract the name, the tag or whatever we're looking for.

10:42.200 --> 10:44.720
So for now I'm gonna just access the name.

10:44.720 --> 10:49.000
So I'm going to use this call info dot object dot name.

10:49.000 --> 10:54.180
So call info Infocom object basically means the game objects the circle collided with.

10:54.220 --> 11:00.180
So if the circle collide with this enemy game object, then this call info game object basically means

11:00.180 --> 11:01.620
this enemy game object.

11:01.620 --> 11:05.460
And then after that, we accessing the name of the game object.

11:05.460 --> 11:11.420
As you can see, firstly we going over to this enemy game object and then we accessing the name of the

11:11.420 --> 11:12.060
game object.

11:12.060 --> 11:16.900
And we can notice that the name of the game object in the inspector is enemy.

11:16.900 --> 11:18.500
So the message should be pop up.

11:18.500 --> 11:23.980
In our console tab says something like circle collided or colliding with enemy.

11:23.980 --> 11:27.180
So this message should be pop up in our console tab.

11:27.180 --> 11:30.540
And now we're going to press down Ctrl S to save our script.

11:30.540 --> 11:34.620
And then move over to unity and move over to unity.

11:34.740 --> 11:36.860
And let's have a look on this.

11:36.860 --> 11:40.700
So we need to select our console tab in order to see the message.

11:40.900 --> 11:46.540
And once the circle just collide with this enemy game object, the message just going to pop up right

11:46.540 --> 11:49.100
away says colliding with enemy.

11:49.100 --> 11:49.150
anime.

11:49.310 --> 11:51.350
So let's select our console tab.

11:51.550 --> 11:57.990
And if we select our console tab and then let's click on this play button in the top in order to play

11:57.990 --> 11:58.830
our game.

11:58.830 --> 12:00.590
And let's have a look on this.

12:08.350 --> 12:16.030
So now if I click the left mouse button, uh, as we can see that the message not getting pop up, even

12:16.030 --> 12:17.950
the circle colliding with this anime.

12:17.990 --> 12:18.510
Why?

12:18.710 --> 12:20.870
Because we just made the attack function.

12:20.870 --> 12:22.070
We never calling it.

12:22.070 --> 12:27.950
So if I get out of play mode, we just made the function, as you can see right over here, but we never

12:27.950 --> 12:32.110
calling it somewhere in the code as well as in the animation event.

12:32.110 --> 12:36.670
So we also need to call this function in order to execute this line of code.

12:36.670 --> 12:42.310
So when we're going to call this attack function we're going to call it once we play attack animation.

12:42.310 --> 12:48.360
Basically if I select my player in the hierarchy then move over to animation tab and then choose attack

12:48.360 --> 12:49.480
one we're going to call.

12:49.480 --> 12:51.640
The function is somewhere around here.

12:51.640 --> 12:54.360
So this is going to be perfect time as you can see.

12:54.640 --> 12:58.600
So in the animation tab left side you can see this add event.

12:58.600 --> 13:01.560
So just click there and then select this add event.

13:01.560 --> 13:06.920
Go over to Inspector uh Inspector in the top right and then function.

13:06.920 --> 13:09.560
As you can see it says no function selected.

13:09.560 --> 13:10.680
So just click there.

13:10.720 --> 13:12.760
Then we will move over to player script.

13:12.760 --> 13:14.680
Then methods basically function.

13:14.680 --> 13:18.280
And we're going to add access the attack function as you can see.

13:18.280 --> 13:22.400
So what we simply doing we just going over to this uh player script.

13:22.400 --> 13:27.240
And then we just calling this attack function and attack function basically doing this thing.

13:27.280 --> 13:28.920
It just printing out the message.

13:28.920 --> 13:32.920
As you can see, if the circle collided with that enemy game object.

13:32.920 --> 13:39.920
And we also need to call this attack function in attack two and attack three animation clip as well.

13:39.920 --> 13:41.920
So we're going to choose those animation clip.

13:42.080 --> 13:45.440
And let's I guess this would be perfect time.

13:45.440 --> 13:48.530
So let's click on this Add ad, even in animation tab.

13:48.730 --> 13:50.290
Let's go over to Inspector.

13:50.330 --> 13:53.330
Let's go to player script methods or functions.

13:53.490 --> 13:55.290
Then we're gonna choose this attack.

13:55.290 --> 13:57.810
And let's do the same thing with this attack three.

13:58.130 --> 14:00.770
Uh, I guess this just gonna be perfect time.

14:00.930 --> 14:03.210
So let's click on this add event.

14:03.210 --> 14:06.010
Go over to Inspector no function player.

14:06.130 --> 14:08.290
Uh, player skip methods or function.

14:08.290 --> 14:09.930
And let's choose this attack.

14:09.930 --> 14:15.690
And now if we select our console tab I'm going to click on this clear in the top left to clear all of

14:15.690 --> 14:16.570
the messages.

14:16.730 --> 14:20.370
And then if we just go ahead and then click on this play button.

14:20.570 --> 14:25.610
As soon as we're going to click the left mouse button, that attack function just gonna trigger through

14:25.650 --> 14:26.930
our animation.

14:27.170 --> 14:32.050
And once the circle collides with this enemy game object, you will able to notice that message just

14:32.050 --> 14:32.930
going to pop up.

14:32.930 --> 14:37.210
So if I just get closer to this enemy and then click left mouse button.

14:37.210 --> 14:43.090
As you can see, as soon as the circle colliding with this enemy, we can see the message in our console

14:43.090 --> 14:46.990
tab just getting pop up, say circle collided with enemy.

14:47.070 --> 14:53.510
Once we playing the animation clip because once we playing the animation clip there, we just calling

14:53.510 --> 14:55.190
the function, which is attack.

14:55.310 --> 14:58.270
So, uh, so I hope you get the idea.

14:58.310 --> 15:01.790
Instead of printing out message, we want to damage it.

15:01.830 --> 15:03.190
Uh, for now, let's leave it.

15:03.230 --> 15:05.070
We're going to take a look on it later.

15:05.070 --> 15:11.470
And if we get out of play mode, uh, basically what we want to do, if we able to see our circle,

15:11.510 --> 15:12.590
it would be nice.

15:12.590 --> 15:18.790
And we do know that in order to see the circle or in order to draw the circle, we need to use a function

15:18.790 --> 15:21.070
calls on draw gizmo selected.

15:21.070 --> 15:27.510
So let's move over to our players and let's move over to this on draw Gizmo selected function.

15:27.510 --> 15:29.710
So we will do it over here.

15:29.910 --> 15:33.230
So we want to draw the circle around that attack point.

15:33.230 --> 15:39.150
But before we draw we need to check if we assign it or not as we have done with this ground check.

15:39.150 --> 15:41.910
So we will check if our attack point.

15:41.910 --> 15:43.670
So let's use this if condition.

15:43.670 --> 15:46.440
Let's make first bracket and some curly brackets.

15:46.440 --> 15:48.360
And what we want to check over here.

15:48.360 --> 15:51.440
We basically want to check uh sorry.

15:52.520 --> 15:56.480
We want to check if if attack point.

15:56.520 --> 16:01.800
Attack point is not equal to null basically means we assign it our attack point.

16:02.240 --> 16:05.160
Now that means we need to draw our circle.

16:05.320 --> 16:13.360
And in order to draw our circle we need to use this gizmos dot draw where sphere function and this function

16:13.360 --> 16:14.360
as first argument.

16:14.360 --> 16:15.920
It's going to take the position.

16:15.920 --> 16:18.800
So we will pass our attack point dot position.

16:18.840 --> 16:20.960
Second thing it's going to take the radius.

16:20.960 --> 16:23.760
So we will pass our attack radius.

16:23.760 --> 16:26.800
And if you want to choose a color for it you can do it.

16:26.800 --> 16:33.720
So before you create the circle we I want to choose a red color or something different color.

16:33.720 --> 16:36.560
So I'm going to assign gizmos dot color.

16:36.800 --> 16:39.680
And I'm going to set color dot red.

16:39.720 --> 16:41.200
I want to choose red.

16:41.200 --> 16:45.490
And let's suppose you don't assign the color that you would like to draw with.

16:45.570 --> 16:49.330
Then it's automatically or by default will be white color.

16:49.330 --> 16:51.090
So I hope you get the idea now.

16:51.290 --> 16:55.090
And we're gonna press Ctrl s to save our script one more time.

16:55.090 --> 16:56.930
And let's head over to unity.

16:56.930 --> 17:03.130
So as soon as our player skip just gonna compile, we will able to notice the circle will be drawn from

17:03.130 --> 17:04.370
this attack point.

17:04.370 --> 17:12.210
Since we pass our attack point, a attack point as a basically for attacking.

17:12.210 --> 17:18.010
So now if I select my player, as you can see, the circle just drawn from this attack point, and we

17:18.010 --> 17:21.690
need to adjust the radius of this attack circle.

17:21.690 --> 17:27.570
So if I select my player then move over to animation tab and select all of these attack to or attack

17:27.570 --> 17:30.370
three Animation Clip and go over to final.

17:30.370 --> 17:36.850
So we need to adjust around this sword or this attack area of this player game object.

17:36.850 --> 17:43.090
So we need to increase a increase a little bit are basically the circle radius.

17:43.140 --> 17:45.700
So we will select our player in the hierarchy.

17:45.700 --> 17:48.900
Then go over to Inspector Player Skip and Attack radius.

17:48.900 --> 17:55.580
I'm gonna increase a little bit something around 1.1.1.45.

17:55.900 --> 17:57.420
So 1.45.

17:57.420 --> 18:01.740
Or we can do 67I guess 1.5 just gonna be perfect.

18:01.740 --> 18:05.100
So as you can see 1.5 is perfect.

18:05.100 --> 18:08.500
And we can check with other attack animation as well.

18:08.500 --> 18:09.660
So let's click here.

18:09.980 --> 18:11.140
Let's choose attack.

18:11.140 --> 18:13.380
And I guess this is fine.

18:13.380 --> 18:15.180
And if we choose attack one.

18:15.180 --> 18:17.020
So this seems pretty much fine.

18:17.380 --> 18:19.100
So I hope you get the idea.

18:19.100 --> 18:23.060
And I guess we need to drag a little bit down our attack point.

18:23.060 --> 18:24.980
So it's gonna fix the area.

18:24.980 --> 18:30.460
So I'm gonna choose my attack point underneath my player game object in the hierarchy, and let's drag

18:30.460 --> 18:33.340
it a little bit down to match up perfectly.

18:33.500 --> 18:39.460
And once you are satisfied, make sure you just go over to Inspector Overrides and then apply all.

18:39.460 --> 18:44.880
So the changes you made, it's gonna save into this player GameObject prefab as well.

18:44.880 --> 18:46.800
So we will have it, all of it.

18:46.800 --> 18:49.360
And I want this animator component up.

18:49.360 --> 18:54.080
And I want this player script in the bottom in this player GameObject.

18:54.080 --> 18:55.480
So how we can do that?

18:55.520 --> 18:59.040
In order to do it, you need to open up in prefab mode.

18:59.080 --> 19:03.000
In order to do it, you can see you can just move over to hierarchy.

19:03.160 --> 19:07.840
And if we select our player in the right side, we can see an arrow icon.

19:07.840 --> 19:12.040
So we can just click there in order to open our player in prefab mode.

19:12.200 --> 19:18.440
Or we can simply click on this open in Inspector right over here in the top right here.

19:18.720 --> 19:24.920
Uh, so if we just right click on this animator component and then click on this pop up, we can see

19:24.920 --> 19:30.400
that we cannot do it until and unless we open up this player in prefab mode.

19:30.400 --> 19:32.920
So we need to click on this open prefab.

19:32.920 --> 19:37.440
Or you can simply click over here in the hierarchy as well in this arrow.

19:37.440 --> 19:41.200
Or you can simply click on this open in Inspector as well.

19:41.330 --> 19:43.530
I'm going to click on this open prefab.

19:43.530 --> 19:48.450
And now if I right click on this animator component and then click on this move up.

19:48.490 --> 19:53.650
As you can see as soon as we click this animator just component, just move it up.

19:53.650 --> 19:56.450
And this player script just gets in the bottom.

19:56.770 --> 20:03.970
And in order to go back in hierarchy, we can see the back arrow in the top, uh, top left side in

20:03.970 --> 20:05.170
our hierarchy tab.

20:05.170 --> 20:08.210
So we can just click there in order to go back.

20:08.370 --> 20:16.930
So I hope you get the idea how that how that how you can create the circle and how you can damage your

20:16.970 --> 20:18.410
enemy game object.

20:18.570 --> 20:24.930
And once you are done, make sure you press down Ctrl S on your keyboard in order to save your project.

20:24.930 --> 20:31.330
Or you can simply move over to top left file and then click on the save button right over here in order

20:31.330 --> 20:32.010
to save.

20:32.010 --> 20:36.090
So whatever you have done in Unity editor, it will be saved.

20:36.090 --> 20:41.170
So I'm gonna simply press down Ctrl s on my keyboard in order to save my project.
