WEBVTT

00:00.040 --> 00:02.520
We need to set our line renderer component.

00:02.520 --> 00:03.600
So we're going to do that.

00:03.600 --> 00:06.760
So let's select our enemy one GameObject in the hierarchy.

00:06.920 --> 00:09.120
And let's click on this add component.

00:09.120 --> 00:15.960
And we're going to add a line renderer component in order to see the way that this enemy GameObject

00:16.000 --> 00:18.600
shooting on our player GameObject.

00:18.600 --> 00:23.560
So let's add a line renderer component and let's go to Line Renderer component.

00:23.560 --> 00:27.080
And we're going to scroll down and let's move over to this material.

00:27.120 --> 00:29.280
As you can see it says non material.

00:29.280 --> 00:32.440
So we need to choose a material in order to see that.

00:32.440 --> 00:34.160
So let's click over here.

00:34.520 --> 00:36.560
And we need to choose a default material.

00:36.560 --> 00:39.080
So you can just type it over here default.

00:39.080 --> 00:42.640
Or you can simply click on this default as well over here.

00:43.000 --> 00:44.920
And we can see we don't have the width.

00:44.920 --> 00:48.560
So what we're going to do we're going to remove this line renderer component.

00:48.560 --> 00:50.880
And we're going to add one more time.

00:50.880 --> 00:57.720
Basically we're gonna add that renderer line renderer component one more time to basically able to get

00:57.720 --> 00:58.400
the width.

00:58.560 --> 01:01.270
So let's right click on it and let's remove component.

01:01.270 --> 01:04.670
And we're going to add the line renderer component once again.

01:04.670 --> 01:06.710
So let's click on this component.

01:06.830 --> 01:08.830
And we're going to add the line renderer.

01:08.830 --> 01:10.390
Let's go to materials.

01:10.390 --> 01:12.710
And now we can see the width over here.

01:12.710 --> 01:15.070
So that's why we just remove that.

01:15.070 --> 01:21.190
And then we just attach it one more time because we we wasn't able to see this width.

01:21.190 --> 01:22.670
So that is the reason.

01:22.670 --> 01:24.310
So we're going to move over to material.

01:24.310 --> 01:27.110
And we're going to see we're going to select default.

01:27.270 --> 01:30.070
And let's go to size position.

01:30.070 --> 01:32.910
And we're going to set the x something like this much.

01:32.910 --> 01:36.150
And we can press down F in order to focus on that.

01:36.550 --> 01:39.350
So we need to play around with this value.

01:39.350 --> 01:41.710
So I'm going to play around with this x.

01:42.430 --> 01:45.350
So now we can see it's just getting resized.

01:45.350 --> 01:48.670
So with I'm going to choose the x something like four.

01:49.110 --> 01:52.030
And I want to make the width a little bit.

01:52.270 --> 01:54.830
Uh you can simply say uh thickness.

01:54.830 --> 01:56.830
So we're going to drag down this width.

01:56.830 --> 02:02.450
So as you can see we can able to see our chain I'm gonna move this up a little bit.

02:02.490 --> 02:04.050
In order to be able to see that.

02:04.050 --> 02:06.210
So I'm gonna move this in the Y.

02:06.610 --> 02:07.690
Something like this.

02:08.010 --> 02:09.650
In the X as well.

02:10.490 --> 02:12.810
So I guess this is pretty much fine.

02:12.810 --> 02:16.730
And we are now able to see our line renderer component.

02:16.730 --> 02:19.610
And I'm gonna choose a yellow color, something like that.

02:19.610 --> 02:25.810
So I can assume that the yellow one just gonna shoot out from this Army game object.

02:26.290 --> 02:28.810
So I'm going to make the color yellow something like that.

02:28.810 --> 02:31.970
So let's click on this color and let's click over here.

02:31.970 --> 02:35.370
And we're going to choose a yellow color something like this.

02:35.370 --> 02:36.770
And we're going to select this one.

02:36.770 --> 02:38.210
And let's delete that.

02:38.610 --> 02:40.290
And this is fine.

02:40.290 --> 02:43.890
And we need to make our thickness thickness a little bit down.

02:43.890 --> 02:45.650
So we can still able to see.

02:46.290 --> 02:49.810
You can simply say it's too much uh width.

02:49.810 --> 02:56.450
So we're going to drag a little bit down something this much I guess this is pretty much fine by now.

02:57.410 --> 03:01.560
And what we need to do now, we need a reference of this renderer.

03:01.600 --> 03:03.000
Line renderer component.

03:03.000 --> 03:04.520
Then we can set that up.

03:04.640 --> 03:09.560
So let's open up our animation script and let's go to the top of our class because we need to grab the

03:09.560 --> 03:10.600
reference first.

03:10.600 --> 03:13.920
So we're going to make a public line renderer.

03:14.080 --> 03:19.520
So we basically doing the same same thing as we have done in our player game object.

03:19.520 --> 03:21.640
And we're going to call it something like LR.

03:21.680 --> 03:23.720
And let's close that up with semicolon.

03:24.000 --> 03:26.680
And we're going to move over to this start function.

03:26.680 --> 03:32.200
In this start of the game we just want to disable this LR or this line renderer component.

03:32.200 --> 03:38.680
But once this enemy game object shoot out uh shoot out, then we're going to enable this line renderer

03:38.680 --> 03:39.120
component.

03:39.120 --> 03:41.160
So we're going to move over to start function.

03:41.160 --> 03:42.760
And we're going to move over to LR.

03:42.800 --> 03:44.720
Then we're going to use this dot enable.

03:44.720 --> 03:46.560
And we're going to set equal to false.

03:46.560 --> 03:48.760
Basically we just disabling that.

03:48.760 --> 03:52.080
And we're going to press down Ctrl s in order to save our script.

03:52.080 --> 03:58.320
And let's move out to unity because we need to drag the reference in our LR uh slot.

03:58.320 --> 03:59.560
So we're going to have the reference.

03:59.560 --> 04:01.270
Then we can set that up.

04:01.990 --> 04:03.470
So just wait for it to compile.

04:03.470 --> 04:08.030
And once it's done, we need to drag the reference in that corresponding slot.

04:09.550 --> 04:12.150
It's going to take a few moments, so just wait.

04:12.150 --> 04:14.750
And once it's done you are ready to do that.

04:15.030 --> 04:19.150
So as soon as our enemy script gets compiled we can see LR in it.

04:19.150 --> 04:22.230
Says non line renderers basically means empty.

04:22.230 --> 04:26.870
So we're going to select this line, run a line renderer and we're going to drag it right there.

04:26.910 --> 04:29.230
Now we have the reference as you can see.

04:29.430 --> 04:32.150
And we also want to go over to overrides.

04:32.150 --> 04:35.390
And then we're going to click on this apply to change in the prefab.

04:35.710 --> 04:37.190
And let's go to script now.

04:37.390 --> 04:40.870
And let's move over to that line of code where we're shooting.

04:40.870 --> 04:43.670
So we're shooting over here as you can see.

04:43.990 --> 04:45.470
So what we need to do.

04:45.630 --> 04:50.550
So once we shoot firstly we need to need to enable our line renderer component.

04:50.550 --> 04:52.390
And then we're going to set the position.

04:52.590 --> 04:53.430
So let's do that.

04:53.430 --> 04:55.150
So we're going to move over to script.

04:55.150 --> 05:01.770
So once we're calling this shoot raycast function because we basically need to enable our line renderer.

05:01.770 --> 05:04.010
So I'm going to move over to line renderer component.

05:04.010 --> 05:05.530
And we're going to use this enable.

05:05.530 --> 05:07.330
And we're going to set equal to true.

05:07.530 --> 05:09.410
Basically we're just enabling that.

05:09.650 --> 05:12.210
And after that we need to set the position.

05:12.210 --> 05:17.770
And in order to set the position uh we need to use LR dot set position function.

05:17.970 --> 05:20.650
So what I'm going to do I'm going to set over here.

05:21.330 --> 05:23.010
So I'm going to bring down this.

05:23.010 --> 05:27.570
Or you can just leave it that and I'm going to do it over here something like that.

05:27.570 --> 05:29.850
So we're going to store the first position.

05:29.850 --> 05:36.490
So let's suppose this anime game object uh game object shoot on our this player game object.

05:36.490 --> 05:39.770
Then what we're going to do, uh, we're gonna set the position.

05:39.770 --> 05:45.890
So the first, uh, position or where we're gonna shoot out the ray, we're going to store that position

05:45.890 --> 05:47.690
into zero index.

05:47.690 --> 05:52.690
So and then we're going to set the second position basically where the ray collided with.

05:52.690 --> 05:56.090
So we that ray is going to collide with this player game object.

05:56.090 --> 06:01.800
So where it's collided with we're going to uh As basically that will be the second position and we're

06:01.800 --> 06:04.760
going to store the position into one index.

06:04.760 --> 06:06.920
So let me show you how you can do that.

06:06.920 --> 06:08.160
So let's go to script.

06:08.160 --> 06:09.880
So the first position we're going to set.

06:09.880 --> 06:14.400
So we need to use this alert dot set position function in order to set the position.

06:14.720 --> 06:16.960
So we're going to store the first position.

06:16.960 --> 06:19.920
So the first position we're going to store in this zero index.

06:19.920 --> 06:22.960
So we need to pass the index as a first argument comma.

06:23.240 --> 06:29.080
And we have to store the position or which position we want to store in this zero index.

06:29.080 --> 06:32.240
So we're going to store the position where we shooting out the array.

06:32.280 --> 06:33.920
So we're gonna shoot out the array.

06:33.920 --> 06:36.840
We do know from this anime game object Fire point.

06:36.920 --> 06:39.480
We created the fire point as using.

06:39.480 --> 06:43.000
So now store that position or where we shooting out.

06:43.000 --> 06:46.800
We're gonna store that position into this zero index.

06:46.800 --> 06:49.880
So what we're going to do type of what we're going to do over here.

06:49.880 --> 06:52.720
We're going to pass fire point dot position.

06:53.080 --> 06:58.240
So we're going to pass fire point dot position basically means where we're shooting out the array.

06:58.560 --> 07:03.550
Uh, we do know we're going to shoot out the ray from the top of our enemy game object gun.

07:03.750 --> 07:07.150
So fire point position and let's close that up with semicolon.

07:07.950 --> 07:10.230
And now we're going to move over to this hit info.

07:10.390 --> 07:16.030
And if hit info is true basically means the ray really colliding with this uh, player game object.

07:16.030 --> 07:18.750
So where it's collided with this player game object.

07:18.750 --> 07:21.630
So we're going to store that position in one index.

07:21.630 --> 07:24.950
So we store it the first position in zero index.

07:24.950 --> 07:29.350
And we're going to store the second position where the collided with this player game object.

07:29.350 --> 07:32.470
We're gonna store that position into one index.

07:32.470 --> 07:33.310
So let's do that.

07:33.310 --> 07:36.310
And we colliding over here as you can see.

07:36.350 --> 07:40.270
And we printing out a message in the console says player takes damage.

07:40.270 --> 07:45.510
And after printing out or doing like that I'm going to set the position as well, which is the next

07:45.510 --> 07:46.190
position.

07:46.190 --> 07:49.550
Or you can simply say simply say the second position.

07:49.550 --> 07:54.710
So we're going to use this last set position function one more time in order to set the position.

07:54.710 --> 07:57.750
So we're going to set the second position into one index.

07:57.750 --> 08:03.970
So we need to pass the index as a first argument comma, and we have to pass the position or where the

08:04.170 --> 08:05.010
collided with.

08:05.050 --> 08:07.810
We're going to store that position into this one index.

08:07.810 --> 08:13.730
So we're going to pass over here hit info dot point and then close that up with semicolon.

08:13.730 --> 08:19.530
So hit info dot point basically means the where the collided with our player game object.

08:19.530 --> 08:22.050
So the array is just going to collide with this player game object.

08:22.050 --> 08:25.090
Once our player game object gets in attack range.

08:25.090 --> 08:26.530
So the range is going to collide.

08:26.530 --> 08:31.210
So we just taking that position where the collided with with this player game object.

08:31.210 --> 08:35.410
And we're storing this position into one index as you can see.

08:35.410 --> 08:40.770
So this hit info point basically means where the collided with the player game object.

08:40.770 --> 08:44.650
But let's suppose the don't collide with this player game object.

08:44.650 --> 08:50.410
And let's suppose this player game object jumps, but this enemy game object is still gonna shoot on

08:50.410 --> 08:53.970
this player game object bits, because it's gonna be in attack range.

08:53.970 --> 08:54.810
So that's why.

08:54.850 --> 08:58.850
So in that situation we need to shoot out the ray in the air.

08:59.240 --> 09:00.960
in the air, something like that.

09:00.960 --> 09:02.080
We need to do that.

09:02.080 --> 09:04.920
So what we're going to do, we're going to use this else condition.

09:04.920 --> 09:12.000
So else if the ray is don't collide with our player game object means our, uh, enemy need to shoot

09:12.000 --> 09:12.840
in the air.

09:12.880 --> 09:14.480
So we need to set the position.

09:14.480 --> 09:18.640
So we're going to use this one more time which is LR dot set position function.

09:19.080 --> 09:22.560
And we do know as a first argument it's going to take the position.

09:22.560 --> 09:25.160
So we're going to store the position in this one index.

09:25.160 --> 09:31.800
And we do know we store the first position or where we shoot it out the ray uh into this zero index.

09:31.800 --> 09:37.680
And we're just setting the second position or we're storing the second position into this one index.

09:37.680 --> 09:41.560
So over here it's not going to collide at all with this player game object.

09:41.560 --> 09:43.680
So we're going to shoot out the ray in the air.

09:43.720 --> 09:49.760
So we need to still want to see the line renderer with how much length of the ray is it.

09:49.760 --> 09:51.720
And we just want to see that.

09:51.960 --> 09:53.240
Still want to see that.

09:53.920 --> 09:58.240
So what we're going to do over here over here we're going to pass.

09:58.240 --> 10:00.110
So transform.position.

10:00.150 --> 10:02.550
Firstly we're going to pass fire point dot position.

10:02.830 --> 10:04.630
Fire point dot position.

10:04.630 --> 10:10.110
Fire point dot position basically means the current position or from where we shouted out the ray.

10:10.110 --> 10:13.310
So we're going to shoot out the ray from this fire point position.

10:13.310 --> 10:16.510
And on top of that, we're gonna multiply.

10:16.670 --> 10:21.590
We're going to add on top of that the direction, and we're going to multiply the length of the ray.

10:21.670 --> 10:24.710
So we're going to type this transform dot right.

10:24.750 --> 10:25.790
Transform dot right.

10:25.790 --> 10:28.750
Basically means in which direction the player is facing.

10:29.110 --> 10:31.750
Basically this player is facing to the left direction.

10:31.950 --> 10:37.430
But in this situation transform that right going to be this direction which is the right one.

10:37.430 --> 10:40.630
But we just want to shoot out the ray in the left direction.

10:40.630 --> 10:44.190
So that's why we're going to put the top top of this.

10:44.190 --> 10:47.390
Or we can simply type transform dot left as well.

10:47.430 --> 10:49.670
Or we can simply do transform dot right.

10:49.670 --> 10:52.190
And you can just put this into a bracket.

10:52.190 --> 10:54.230
So just put it into brackets.

10:54.230 --> 10:57.550
And then before you just type transform dot right.

10:57.550 --> 11:00.010
Just put minus and now this minus.

11:00.010 --> 11:02.810
Just going to reference the left direction.

11:02.810 --> 11:05.770
We do no transform dot right basically means this direction.

11:05.770 --> 11:07.370
And we're just putting minus.

11:07.410 --> 11:10.410
It's basically just going to reference the left direction.

11:10.410 --> 11:16.330
And we're going to multiply that direction with our length of the ray which is distance we do know.

11:16.330 --> 11:22.330
So we're going to able to see our line renderer with the that much of length of the ray.

11:22.370 --> 11:28.170
So we're going to multiply this direction with our distance basically means the length of the ray.

11:28.210 --> 11:30.850
And now we're going to close that off with semicolon.

11:31.290 --> 11:37.730
So firstly what we have done we just we have taken the five pointer position basically means where we

11:37.850 --> 11:39.410
just are shooting out the ray.

11:39.410 --> 11:44.210
So transform dot position and top of that we just adding multiply.

11:44.290 --> 11:46.010
We just taking our direction.

11:46.010 --> 11:50.610
And then we just multiplying with our length of the ray as you can see.

11:50.850 --> 11:56.730
So that way it's just going to be in the left direction with our distance parameter, with our length

11:56.730 --> 11:58.090
of the ray which is ten.

11:58.130 --> 12:01.800
We set, as you can see underneath our anime script.

12:01.800 --> 12:05.000
So we're going to press down Ctrl S in order to save our script.

12:05.000 --> 12:06.720
And let's move over to unity.

12:06.840 --> 12:11.240
And let's suppose the array is really collided with that player game object.

12:11.240 --> 12:18.120
Then what we have done over here, as you can see, uh, we uh, over here, we can see the second position

12:18.120 --> 12:23.200
basically where the array hit, we just store it that second position in this one index.

12:23.200 --> 12:28.640
And if the array don't collide with our player game object in that we still able to see our array.

12:28.680 --> 12:31.440
As you can see firstly we're taking the position.

12:31.440 --> 12:38.400
And on top of that we just multiplying with our uh direction as well as we uh basically we just taking

12:38.400 --> 12:42.960
the direction and then multiplying with our distance or the length of the array.

12:42.960 --> 12:45.960
So we're gonna still able to see that array.

12:46.200 --> 12:52.080
So now if we click on this play button you will see that uh line renderer.

12:52.360 --> 12:53.280
Line renderer.

12:53.320 --> 12:59.030
As soon as the game start you will see this gonna be disabled, that line renderer component because

12:59.030 --> 13:00.990
we know we just disabling.

13:00.990 --> 13:07.030
But once this enemy game object on a attack on just gonna shoot on this player game object, you will

13:07.030 --> 13:07.870
see the array.

13:07.870 --> 13:08.750
So just wait.

13:09.030 --> 13:14.270
And as you can see, as soon as we get in attack range, we able to see our array.

13:14.270 --> 13:18.470
And if we even jump, we still able to see our array in the air.

13:18.510 --> 13:25.510
But we need to disable this ray once our player game object is not in attack range or something like

13:25.510 --> 13:29.470
that, it's just out of this enemy game object attack range.

13:29.470 --> 13:30.990
So we need to disable that.

13:30.990 --> 13:32.470
So let's get out of play mode.

13:32.470 --> 13:37.190
As you can see in the console, we just printing out a message saying disable alert.

13:37.190 --> 13:38.990
So we're going to double click on that.

13:39.030 --> 13:44.310
Basically what we have done we have done all of these things in this AI enumerator function.

13:44.310 --> 13:48.510
And we do know that we use this function in order to release some line of code.

13:48.630 --> 13:51.350
And we're doing it over here as you can see.

13:51.630 --> 13:53.270
So after this amount of time.

13:53.270 --> 14:00.420
So use this over here as I did here which is return new point version and you have to put the time in

14:00.420 --> 14:01.660
these brackets in.

14:01.820 --> 14:06.180
Basically, after this amount of time, you can do whatever you just want to do.

14:06.180 --> 14:12.340
So after this amount of time, I just want to disable or other line renderer component, and I have

14:12.340 --> 14:19.340
chosen a pretty small number, as you can see, because I want a pretty small short period of time in

14:19.340 --> 14:21.100
order to disable the laser.

14:21.100 --> 14:26.980
But once this anime game object just sorry player game object gets in attack range, it's gonna enable

14:27.020 --> 14:33.460
the line renderer component, and after a short period of time or pretty with pretty much small time,

14:33.460 --> 14:39.100
I just want to disable that renderer component as we're gonna do that.

14:39.100 --> 14:40.820
Basically, we just want to disable.

14:40.820 --> 14:47.140
And as you can see, we're just printing out a message in the console says disable line renderer or

14:47.180 --> 14:48.140
LR component.

14:48.140 --> 14:53.140
So instead of printing out this message we're gonna disable our line renderer component.

14:53.140 --> 14:55.980
So we're going to use this LR dot enable.

14:55.980 --> 14:58.080
And we're going to set equal to false.

14:58.080 --> 15:03.440
Basically, we disabling that line renderer component after this amount of time.

15:03.480 --> 15:10.760
As you can see, and we have the we have approached the same way we have done in this player game object.

15:10.760 --> 15:16.680
So you can just, uh, take a look on that player shooting scripting as well if you just want to get

15:16.680 --> 15:17.360
it more.

15:17.600 --> 15:21.640
Uh, of course I will have a video in the resources as well.

15:21.640 --> 15:28.640
If you just want to learn more deeply about line renderer component, as well as about shooting, shooting

15:28.640 --> 15:31.360
how you can shoot by using raycast.

15:31.360 --> 15:34.760
And we're going to press down Ctrl S in order to save our script.

15:34.760 --> 15:36.640
And now let's move over to unity.

15:36.920 --> 15:43.040
So we will see after 0.12 second the line renderer just gonna be disabled by itself.

15:43.200 --> 15:46.440
But once we shoot one more time, it's just gonna enable.

15:46.640 --> 15:49.680
And after that amount of time it's gonna be disabled.

15:49.680 --> 15:54.920
Because as you can see, as soon as we calling this shoot raycast function, we enabling.

15:54.920 --> 16:00.310
And after doing all of these things and after this amount of time, we disabling as you can see.

16:00.710 --> 16:02.630
So let's go to unity now.

16:02.630 --> 16:06.030
And let's click on this play button in the top in order to check it.

16:11.430 --> 16:15.550
So just wait for to compile and let's have a look.

16:15.590 --> 16:16.590
You will see that.

16:17.190 --> 16:21.110
So let's get in attack range of this enemy game object.

16:21.430 --> 16:26.710
And as soon as we can see get in attack range we can see the line rendered.

16:26.750 --> 16:32.070
Just get enabled and it's just getting disabled as soon as we out of attack range.

16:32.070 --> 16:37.350
And also it just disabling after something like 0.12 second.

16:37.510 --> 16:42.830
But it seems like our enemy game object is shooting a lot at one moment.

16:42.830 --> 16:44.350
So we need to stop doing that.

16:44.350 --> 16:45.750
So let's get out of play mode.

16:45.750 --> 16:49.190
So what we're gonna do, we're gonna make we're gonna tweak the animation.

16:49.230 --> 16:52.750
Basically, we need to select our enemy one GameObject in the hierarchy.

16:52.750 --> 16:54.390
Let's go to animation tab.

16:54.550 --> 16:56.270
And then we can see we have the shooting.

16:56.270 --> 16:59.260
So click over here in order to choose the animation.

16:59.260 --> 17:01.820
So this is the animation clip.

17:01.820 --> 17:05.420
So what I want to do, I just want to copy the first frame.

17:05.420 --> 17:11.780
And then I'm going to paste it uh, a lot of times to just uh, delay the shooting thing because I just

17:11.780 --> 17:12.900
want to move this.

17:12.940 --> 17:16.180
You can simply say this one a little bit further away.

17:16.180 --> 17:22.260
So this player game object gonna have a little moment to shoot on this, uh, enemy game object as well.

17:22.260 --> 17:28.260
And this enemy game object, just gonna take a few moments to shoot on this player game object as well.

17:28.260 --> 17:31.500
And we don't want to shoot a lot of time at once.

17:31.500 --> 17:36.900
We just want to shoot something like, uh, something like 0.1 second or sorry, uh, after one second

17:36.900 --> 17:38.620
or after 1.2.

17:38.820 --> 17:42.180
Basically we just want to choose a little bit bigger number.

17:42.180 --> 17:45.700
So what we're going to do, we're going to select all of this frame basically last three.

17:45.700 --> 17:49.620
And we're going to move it a little bit further away in animation tab.

17:49.620 --> 17:51.740
So you can just select like this.

17:51.740 --> 17:55.860
And we're going to move it somewhere over here something like that in ten.

17:56.140 --> 17:59.320
So I guess I'm gonna move it something like seven.

17:59.520 --> 18:04.800
And also, we need to we're gonna drag this shoot function somewhere over here because this function

18:04.800 --> 18:08.000
is responsible for shooting out, as you can see.

18:08.040 --> 18:10.200
And we're calling the shoot function over here.

18:10.200 --> 18:13.120
So we're going to also move this one a little bit further away.

18:13.120 --> 18:17.640
So we're going to have a little time to shoot on this enemy game object as well.

18:17.640 --> 18:23.400
And make sure you just hit this red button over here in order to capture the animation as you're not

18:23.680 --> 18:24.520
able to do it.

18:24.520 --> 18:28.000
So I'm going to click on this red button in order to record the animation.

18:28.000 --> 18:31.320
And I'm going to click on that once again and to capture it.

18:31.320 --> 18:32.840
Or you can just leave it like that.

18:32.840 --> 18:35.040
It's automatically going to be captured.

18:35.040 --> 18:36.800
And now we're gonna able to see.

18:36.800 --> 18:41.880
So let's select the console and let's click on this play button because I want to see that message.

18:42.480 --> 18:44.480
So you will see this enemy game object.

18:44.520 --> 18:50.520
Now it's gonna take a few moments to shoot on this player game object because we just drag it that function

18:50.560 --> 18:57.230
a little bit further away in animation tab as well as we just drag it some animation, Nation a basically

18:57.230 --> 19:00.630
individual spread of shooting animation, as you can see.

19:00.670 --> 19:06.310
Anime is now taking a little bit more movement in order to shoot, so so you can just drag it a little

19:06.390 --> 19:07.950
bit further away as well.

19:07.950 --> 19:12.230
If you just want to just get a perfect number, you can do that.

19:12.230 --> 19:14.830
So I'm going to get out of play mode and I'm going to do it.

19:14.830 --> 19:18.030
So I'm going to select my anime -- game object in the hierarchy.

19:18.030 --> 19:21.270
Let's move to animation tab and then animation.

19:21.270 --> 19:25.670
And I'm going to still want to move a little bit further away something like one.

19:26.030 --> 19:27.630
So let's select all of this frame.

19:27.630 --> 19:31.990
But before we do let's click on this red button in order to record the animation.

19:31.990 --> 19:33.790
And I'm going to select all of these three.

19:33.790 --> 19:39.070
And I'm going to drag it a little bit further away as well as we need to drag this event a little bit

19:39.070 --> 19:39.990
further away.

19:40.030 --> 19:42.270
Or you can simply say this should function.

19:42.270 --> 19:45.790
So it's going to take a moment to shoot on this player game object.

19:45.790 --> 19:48.870
In order to shoot on this player game object.

19:48.870 --> 19:53.150
And I'm going to click on this red button one more time in order to capture the animation.

19:53.150 --> 19:55.110
Now it should be fine by now.

19:55.110 --> 19:57.620
So let's have a look on this one more time.

19:57.620 --> 20:02.220
I'm going to make my player speed a little bit fast or what we can simply do.

20:02.220 --> 20:08.660
We can disable this line render component in this uh, by default we can just disable that so we can

20:08.660 --> 20:10.740
select our enemy one game object.

20:10.780 --> 20:13.300
Let's go to Inspector Line renderer component.

20:13.300 --> 20:14.780
And I'm going to uncheck uncheck.

20:14.780 --> 20:17.220
It basically means you just disabling that.

20:17.220 --> 20:20.700
And we also disabling as soon as the game started.

20:20.700 --> 20:24.340
As you've seen in the start function, we already have done.

20:24.340 --> 20:29.100
And I'm going to do the same thing with this player game, uh, with this player game object, because

20:29.100 --> 20:32.700
we can see one more line render component is active.

20:32.700 --> 20:34.260
So we need to disable that.

20:34.260 --> 20:39.260
So I'm going to select my player game object because in this player game object I have attached this

20:39.260 --> 20:42.420
line renderer component as you can see in the inspector.

20:42.420 --> 20:43.300
So I'm going to uncheck.

20:43.300 --> 20:45.540
It means we just disabling that.

20:45.820 --> 20:52.100
And now as you can see it's uh seems pretty much uh pretty much clean by now.

20:53.020 --> 20:57.880
And also I want to move this, uh, align Aline render component app.

20:57.920 --> 20:59.040
Something like this.

20:59.080 --> 21:03.160
Or we need to open up and let's take a look on that later.

21:03.160 --> 21:06.680
And let's click on this play button in the top in order to check.

21:06.680 --> 21:10.120
So I forgot to speed up my player speed.

21:10.120 --> 21:12.240
So I really apologize.

21:12.240 --> 21:17.680
We can do in play mode as well, so I can simply select my player game object in the hierarchy and I

21:17.680 --> 21:23.080
can make the speed over here something like three, in order to make it a little bit faster.

21:23.080 --> 21:25.880
As you can see now, it's pretty much fine.

21:25.880 --> 21:31.040
This enemy is just taking a little moment in order to shoot on our player game object.

21:31.040 --> 21:35.320
So you can just play around with any number that you would like to go with.

21:35.320 --> 21:37.200
So you can just check that out.

21:37.400 --> 21:43.240
So I'm gonna get out of play mode, and now we're gonna move over to overrides and we're gonna apply

21:43.240 --> 21:43.760
all.

21:44.600 --> 21:50.120
And also we're gonna press down control S on our keyboard in order to save our project.

21:50.440 --> 21:56.200
Or we can simply go over to top left file, then click on the save button over here in order to save

21:56.200 --> 21:57.240
your project.
