WEBVTT

00:00.050 --> 00:00.530
Hello guys.

00:00.530 --> 00:01.520
Welcome to the video.

00:01.520 --> 00:08.300
So before we go and develop any other enemies, we need to set up interaction between player and enemies.

00:08.300 --> 00:12.770
And also we need to set up interaction between two enemies because that is also possible.

00:12.770 --> 00:19.850
So first of all, if we go to the play mode right now and I'm going to just walk into the mushroom,

00:19.850 --> 00:21.440
this is what is going to happen.

00:21.440 --> 00:22.970
I'm going to push him like that.

00:24.350 --> 00:27.950
Morton that if I take two mushrooms and place them.

00:31.360 --> 00:32.800
On the level like so.

00:35.950 --> 00:39.430
Taking a walk and then they're going to push each other as well.

00:39.430 --> 00:40.300
Not cool.

00:40.300 --> 00:45.820
So first we need to disable interaction between these three so they can walk and not touch each other

00:45.850 --> 00:46.390
okay.

00:46.390 --> 00:48.070
So let's go to preference.

00:48.550 --> 00:50.590
And sorry not preference.

00:50.590 --> 00:53.650
We need project settings over here.

00:53.830 --> 00:56.050
Then we're going to need to find physics 2D.

00:56.470 --> 01:01.300
Let me open this wider and over here below.

01:02.680 --> 01:03.280
Hey, where is it?

01:03.310 --> 01:04.450
It was here, man.

01:04.750 --> 01:05.980
Layer collision matrix.

01:05.980 --> 01:06.460
Okay.

01:06.460 --> 01:09.610
New unity version has a special window for this.

01:09.610 --> 01:10.900
Very cool, I like it.

01:10.900 --> 01:16.390
So over here, we need to disable, um, collision between enemy and a player.

01:16.390 --> 01:19.990
So let's find a player and deselect enemy over here.

01:19.990 --> 01:24.460
And also we need to find enemy and disable collision between enemies like that.

01:24.460 --> 01:29.710
So now enemy cannot collide with enemy and player cannot collide with enemy as well.

01:29.710 --> 01:30.850
That's what we need.

01:30.850 --> 01:31.840
Very good.

01:31.840 --> 01:33.880
Now let's close this.

01:33.880 --> 01:37.270
Let's go to play mode and let's see how do they behave right now.

01:40.070 --> 01:43.220
I can walk by and they can walk by each other as well.

01:43.250 --> 01:44.270
Very good.

01:44.300 --> 01:48.560
Now we need to add a damage functionality to the mushroom, right.

01:48.560 --> 01:50.630
So it can damage the player.

01:51.020 --> 01:53.000
Uh, we're going to just delete one of them.

01:53.000 --> 01:55.070
And on this one we're going to make.

01:55.800 --> 02:01.230
Uh, 2D sprite square just so I can see the damage area.

02:02.540 --> 02:03.800
Let me do the enemy.

02:04.800 --> 02:07.080
I'm going to place it somewhere here.

02:07.740 --> 02:09.000
Or actually, you know what?

02:09.000 --> 02:11.250
We can just remove the sprite renderer.

02:11.250 --> 02:16.650
We can go to enemy mushroom copy box, collider copy component.

02:16.650 --> 02:22.830
Then we're going to go to square itself and do paste component as new.

02:23.750 --> 02:24.530
Nice.

02:24.530 --> 02:32.420
Let's rename this to Damage Trigger and we're going to set it to Ease Trigger over here and give it

02:32.420 --> 02:34.400
Damage trigger script.

02:34.910 --> 02:35.540
Okay.

02:35.540 --> 02:39.710
Now we just need to be sure that player can enter this trigger area.

02:39.740 --> 02:42.950
For that we're going to go to the enemy mushroom.

02:42.950 --> 02:47.390
Select the collider and make it a bit slimmer horizontally.

02:47.900 --> 02:51.260
And maybe let's reduce a bit from the top like so.

02:51.290 --> 02:51.740
All right.

02:51.740 --> 02:52.550
From the bottom.

02:52.550 --> 02:58.640
Not necessary I think, because otherwise the enemy will just like fall through the ground a bit.

02:58.640 --> 03:01.640
But you can take damage trigger and you can increase.

03:02.600 --> 03:04.010
It over here as well.

03:04.010 --> 03:04.400
Why not?

03:04.400 --> 03:09.770
This would work, but that feels a bit unfair because then player oh actually it's fine.

03:09.980 --> 03:10.970
Why not?

03:12.330 --> 03:13.320
All right.

03:13.320 --> 03:19.560
Uh, now, even though we have this damage trigger area, it's not going to work because this object

03:19.560 --> 03:21.840
damage trigger has layer enemy.

03:21.840 --> 03:25.740
And if you remember, those two have disabled collision between them.

03:25.740 --> 03:33.810
So to fix it, what we need to do is select this damage trigger and change it to default for the damage

03:33.810 --> 03:34.170
area.

03:34.170 --> 03:38.190
Trigger should be default because otherwise they will not be able to collide.

03:38.190 --> 03:40.950
Now if I go and bump into the enemy.

03:41.920 --> 03:43.180
I'm going to get damaged.

03:43.480 --> 03:44.500
Very good.

03:44.800 --> 03:50.980
Now, what we need to do is to make detection of the enemies when player is fallen, so he can jump

03:50.980 --> 03:52.720
on their head and kill them.

03:52.750 --> 03:53.110
Right.

03:53.110 --> 03:54.130
That's what we need to do.

03:54.160 --> 03:55.330
How it's going to be.

03:55.330 --> 03:58.420
We're going to go to player and we're going to set up.

03:59.640 --> 04:01.290
Uh, a bit of a collision here.

04:01.290 --> 04:04.110
So first we need a layer serialized field.

04:05.980 --> 04:08.800
Serialize field private layer mask.

04:08.800 --> 04:10.750
What is enemy?

04:10.750 --> 04:14.440
Because we want to do check only for the enemies and nothing else.

04:14.860 --> 04:16.990
We also need serialize field.

04:17.020 --> 04:22.210
Private transform enemy check that's going to be used for the enemy check position.

04:22.210 --> 04:24.040
And we're going to need serialize field.

04:24.040 --> 04:25.780
Private float enemy.

04:26.710 --> 04:28.210
Check radius.

04:29.390 --> 04:33.830
And let's put a space over here so it's easier to check in the inspector.

04:34.070 --> 04:34.760
Nice.

04:34.760 --> 04:36.920
Now let's go and draw gizmos for this.

04:36.950 --> 04:40.850
Going to be super easy over here we're going to do gizmos.

04:40.880 --> 04:48.800
Draw wire sphere at enemy check position for the enemy check radius.

04:49.620 --> 04:51.030
Now we're going to have gizmos.

04:51.030 --> 04:53.640
Also, this collision check could be done in this method.

04:53.640 --> 04:56.130
Handle collision or.

04:57.110 --> 05:00.050
I could make some other method for this.

05:00.050 --> 05:02.180
This entire method for the enemy check.

05:02.180 --> 05:03.380
And that's what I'm going to do.

05:03.380 --> 05:07.850
I'm going to type over here, handle enemy detection.

05:08.480 --> 05:10.550
Now I'm going to click create button.

05:10.550 --> 05:14.330
Quick actions generate method very well.

05:14.330 --> 05:19.250
Inside of this method we need to type a bit of a script here.

05:19.250 --> 05:25.280
So first of all we want this to work only if player is jumping on the head of the enemies means it's

05:25.280 --> 05:25.970
supposed to work.

05:25.970 --> 05:28.490
Only when we are falling for that we're going to do.

05:28.490 --> 05:34.400
If rb velocity dot y is bigger or equals to zero, then return, then it's not going to work.

05:34.400 --> 05:36.380
Now we took care of that.

05:37.030 --> 05:43.900
Next would be to detect all of the enemies that are below the player, and all of the enemies that got

05:43.900 --> 05:46.300
into the enemies check circle.

05:46.300 --> 05:49.510
So we're going to do this collider array.

05:49.510 --> 05:53.830
So we creating a colliders as a local variable.

05:53.830 --> 05:59.260
And we're going to fill this colliders with the objects that got into a circle that we have.

05:59.680 --> 06:03.220
Uh, maybe let me show you the circle first real quick.

06:03.280 --> 06:04.900
Let's go back to unity.

06:07.430 --> 06:09.890
Now we're going to need new empty transform.

06:10.160 --> 06:11.630
Enemy check.

06:14.610 --> 06:15.690
Can we be consistent?

06:15.690 --> 06:16.320
What do you think?

06:16.320 --> 06:17.430
Let's be consistent.

06:17.430 --> 06:18.810
I'm going to do enemy.

06:19.460 --> 06:22.610
Check with capital letter and I'm going to do here as well.

06:22.640 --> 06:24.650
Ground and damage trigger.

06:24.650 --> 06:26.210
That's what I want to do okay.

06:26.210 --> 06:29.570
So on the player we're going to assign enemy check over here.

06:29.570 --> 06:31.070
What is enemy going to be.

06:31.070 --> 06:33.620
Enemy and enemy check radius.

06:33.620 --> 06:38.120
Let's find the player going to be something like 0.25.

06:38.120 --> 06:39.140
Now let's do bigger.

06:39.140 --> 06:40.160
Let's do.

06:41.080 --> 06:42.400
Point four.

06:43.270 --> 06:44.230
Point five.

06:45.130 --> 06:46.090
Point five looks good.

06:46.090 --> 06:46.690
Why not?

06:46.720 --> 06:51.250
Then let's take this anime check and move it below to the feet of the character.

06:52.020 --> 06:57.060
So if enemy gets into this area, then he can be damaged.

06:57.060 --> 06:58.230
And that's good for now.

06:58.230 --> 07:00.240
Now let's go and make sure it's working.

07:00.240 --> 07:02.160
We're going to go to player script.

07:02.160 --> 07:05.940
And don't forget we need to detect enemies inside of this circle.

07:05.940 --> 07:11.340
And that's why we're going to go here and say that colliders will be equals to physics.

07:11.340 --> 07:21.600
2D overlap circle all from enemy check position within enemy check radius on what is enemy layer.

07:21.600 --> 07:26.370
So this will make a local variable of a colliders as an array.

07:26.370 --> 07:32.610
And it's going to fill it up with all of the colliders that will get into the circle that is drawn on

07:32.610 --> 07:32.970
the enemy.

07:32.970 --> 07:36.750
Check position within enemy check radius on what is enemy layer.

07:36.750 --> 07:37.740
Very nice.

07:37.740 --> 07:42.450
Now we can check this colliders and see if there is any enemy in there.

07:43.360 --> 07:48.820
But before we do that, let's just make sure there is something I'm going to make for each loop.

07:49.210 --> 07:51.310
And we're going to just type here var.

07:51.310 --> 07:53.830
So we're going to detect like any variable.

07:53.830 --> 07:56.680
Basically it's like any variable that can be.

07:56.680 --> 08:00.970
And I'm going to type it as enemy in colliders.

08:00.970 --> 08:02.110
And then I'm going to do this.

08:02.140 --> 08:09.910
If enemy not equals to null then destroy enemy GameObject.

08:10.770 --> 08:13.620
And also let's call jump method.

08:15.900 --> 08:17.370
So that's all what we're going to do.

08:17.370 --> 08:21.450
For now, let's just make sure we can destroy the enemy when we jump on their head.

08:23.450 --> 08:24.860
Gonna go to play mode.

08:27.220 --> 08:28.450
There is the enemy.

08:28.450 --> 08:31.000
And wait a second.

08:31.030 --> 08:32.560
He'll destroy the enemy.

08:32.590 --> 08:33.340
Cool.

08:33.340 --> 08:35.470
Now it is working and all.

08:35.470 --> 08:38.650
What we need to do is to make it pretty, right?

08:39.010 --> 08:40.510
Uh, how do we make it pretty?

08:41.310 --> 08:43.440
Uh, if you remember, I showed you.

08:44.010 --> 08:47.220
An asset reference on how it looks here.

08:47.220 --> 08:49.620
So as we can see it is going a bit up.

08:49.620 --> 08:52.530
Then it rotates and falling down okay.

08:53.680 --> 08:55.270
We know how to change velocity.

08:55.270 --> 08:57.220
We know how to rotate the object.

08:57.220 --> 08:58.900
We know everything here.

09:00.960 --> 09:03.300
Let's go and set up functionality.

09:04.730 --> 09:09.830
Uh, we're going to go to the enemy and over here somewhere.

09:09.830 --> 09:15.530
We need a method that would say something like, let's do protected virtual void.

09:17.410 --> 09:19.480
Um, the right method.

09:20.000 --> 09:23.630
So we're going to call this method when we want to kill the enemy entirely.

09:23.630 --> 09:27.170
When we do this, we're gonna add a bit of a velocity.

09:27.170 --> 09:33.230
Let's do and let's do a header so we can manage the variables real fast.

09:33.620 --> 09:37.910
I'm going to do header death details okay.

09:37.910 --> 09:40.130
We're going to do serialize field private.

09:40.400 --> 09:42.020
Let's do protect.

09:42.020 --> 09:44.180
Actually we don't need protected here.

09:44.180 --> 09:48.800
Private float um death impact.

09:49.340 --> 09:51.110
Also we need serialize field.

09:51.110 --> 09:52.460
Private float.

09:53.570 --> 09:57.320
Death rotation speed because we're going to rotate the character.

09:57.320 --> 10:02.240
And also we need a boolean that would say if we are dead or not and it might be used later on.

10:02.240 --> 10:05.150
So I'm going to do protected bool is dead.

10:05.390 --> 10:07.520
Okay okay okay okay.

10:09.440 --> 10:11.300
Now first thing we want to do.

10:12.280 --> 10:15.580
Uh, when we die, we still trigger animation.

10:16.030 --> 10:16.360
Right.

10:16.360 --> 10:19.900
We're going to do anim set trigger.

10:21.200 --> 10:22.700
It nice.

10:22.700 --> 10:26.840
We also want to give enemy a bit of a velocity up so he can fall down.

10:26.870 --> 10:30.110
RB velocity equals to new vector two.

10:30.740 --> 10:32.240
RB velocity dot x.

10:32.240 --> 10:35.060
And for the y we're going to do death impact.

10:35.060 --> 10:36.110
Nice.

10:36.530 --> 10:39.800
Uh then we want to allow rotation.

10:41.140 --> 10:42.070
How can we do this?

10:42.070 --> 10:43.480
We can make a.

10:45.140 --> 10:46.850
Private void.

10:46.850 --> 10:48.860
Handle death.

10:49.460 --> 10:53.480
And over here, we're going to rotate the character in the same way as we did with the arrow.

10:53.510 --> 10:55.160
Let's go to Trap Arrow.

10:56.030 --> 10:57.860
Over here we have handle rotation.

10:57.860 --> 11:02.570
I'm just going to take this method actually just lines of code from here.

11:02.720 --> 11:05.630
Go back to the enemy paste them in here.

11:05.660 --> 11:08.570
Now the side of the rotation will be random.

11:08.570 --> 11:10.070
I think this is how it should be.

11:10.070 --> 11:13.310
So I'm going to just do how can we do this.

11:13.310 --> 11:15.020
We can make it equals to one.

11:15.680 --> 11:16.310
Wait.

11:17.110 --> 11:17.710
Wait a second.

11:17.710 --> 11:19.960
We need to make a variable over here.

11:21.660 --> 11:23.040
Uh, private int.

11:24.240 --> 11:26.970
This rotation direction.

11:27.330 --> 11:28.830
Let's make it equals to one.

11:30.780 --> 11:36.210
Then I'm going to do random range from 50 to 100, and it's going to be like 50% chance that we're going

11:36.210 --> 11:37.710
to rotate to another side.

11:38.190 --> 11:39.480
This is how it's going to be.

11:39.660 --> 11:42.750
Um, if random range from.

11:43.650 --> 11:46.500
0 to 100 is less than 50.

11:46.530 --> 11:52.770
The Earth rotation direction equals to the Earth rotation direction multiplied by minus one okay.

11:52.980 --> 11:54.990
And over here we can just use.

11:57.080 --> 12:02.330
The Earth rotation speed multiplied by this rotation direction.

12:02.330 --> 12:05.870
So we have handled this rotation nice.

12:05.870 --> 12:09.080
We can call it in the update handle death.

12:09.980 --> 12:13.040
And it's going to be done only if is dead.

12:18.780 --> 12:22.650
Okay, so this is enough to test something.

12:22.650 --> 12:24.030
Let's go and try this out.

12:24.030 --> 12:25.320
Let's see how it works.

12:25.320 --> 12:27.000
Then we're going to go further.

12:27.360 --> 12:31.680
I'm going to go oh wait we destroying the object on the player script.

12:31.680 --> 12:33.000
We need to fix it.

12:33.790 --> 12:38.050
Over here instead of destroying it, we need to call that method die on the enemy.

12:38.050 --> 12:39.610
So this is how it's going to be.

12:39.610 --> 12:42.580
Instead of all of this, we're going to do enemy.

12:44.410 --> 12:46.540
New enemy equals to enemy.

12:46.540 --> 12:48.700
Get component of the enemy.

12:48.700 --> 12:52.480
And then if new enemy is not equals to null.

12:53.590 --> 12:56.530
Not equals to null, then we're going to do new enemy.

12:57.100 --> 12:57.700
Uh.

12:59.360 --> 13:01.040
Is that method not public?

13:03.680 --> 13:06.230
Let's do public virtual void.

13:06.260 --> 13:08.930
Okay, so now it is public.

13:08.930 --> 13:12.770
We can go back to player and call this method over here.

13:13.520 --> 13:14.480
Very cool.

13:14.510 --> 13:16.700
Now let me go and see this.

13:19.980 --> 13:23.700
Also, I think we need to stop anything else if we do this.

13:23.700 --> 13:28.710
So probably would be a good idea to go here and do.

13:28.710 --> 13:31.380
If is dead, then return.

13:31.560 --> 13:32.310
Yes.

13:33.460 --> 13:34.390
Let's go back.

13:38.260 --> 13:40.270
Going to select the enemy mushroom.

13:40.270 --> 13:42.190
Over here we have this impact.

13:42.190 --> 13:45.280
Let's try something like uh five.

13:45.280 --> 13:46.480
And that's rotation speed.

13:46.480 --> 13:48.850
Let's try 150.

13:50.750 --> 13:52.010
Not sure what is going to be.

13:55.710 --> 13:57.510
So I'm going to jump on his head.

13:59.620 --> 14:00.550
Okay.

14:00.550 --> 14:02.080
Almost what we need.

14:03.150 --> 14:03.990
Almost.

14:05.100 --> 14:08.070
First of all, we need to go to asset animations.

14:08.730 --> 14:10.170
Uh, we need to find.

14:10.820 --> 14:15.620
This enemy mushroom hit uncheck loop time.

14:15.620 --> 14:16.970
This is very good.

14:16.970 --> 14:20.240
Also on the animator of the enemy mushroom.

14:22.960 --> 14:24.160
Whereas the animations.

14:26.920 --> 14:27.790
Okay.

14:27.790 --> 14:30.820
If something like this happens, it is better to restart unity.

14:30.820 --> 14:32.260
So that's what I'm going to do.

14:32.650 --> 14:34.000
I'm going to save the project.

14:34.000 --> 14:35.500
I'm going to restart unity.

14:35.500 --> 14:35.980
All right.

14:36.010 --> 14:36.820
Now it's fine.

14:36.820 --> 14:37.990
Here is the animations.

14:37.990 --> 14:40.030
And we go to enemy mushroom hit.

14:41.070 --> 14:44.880
From this trigger and then we not transfer back.

14:44.880 --> 14:46.470
So this is how it should be.

14:46.890 --> 14:48.030
Why didn't it work?

14:48.030 --> 14:48.630
Really?

14:48.630 --> 14:50.970
Why did he kept walking?

14:53.010 --> 14:57.750
Is that return on the enemy is that and handle death.

14:58.170 --> 14:59.400
And we need to make it true.

14:59.400 --> 15:00.030
I forgot.

15:00.030 --> 15:03.450
Let's do this is dead equals to true.

15:05.080 --> 15:07.210
Okay, let's go back.

15:07.680 --> 15:13.920
Just so I have a bit easier time testing, I'm going to let move speed to zero, and I'm going to duplicate

15:13.920 --> 15:17.640
this mushroom and place him over here and one over here.

15:17.760 --> 15:18.690
Now let's go.

15:24.650 --> 15:26.480
Yeah, almost.

15:26.480 --> 15:28.130
Almost perfect.

15:29.500 --> 15:30.040
Yeah.

15:30.040 --> 15:31.480
Okay, okay, I like it.

15:31.510 --> 15:36.160
Now we need to disable all of the colliders that we have on the object.

15:36.160 --> 15:37.600
As of now, we have only one.

15:37.600 --> 15:40.540
And as you can see for this one, it's a box collider.

15:40.540 --> 15:41.320
For other enemy.

15:41.320 --> 15:42.460
It can be another collider.

15:42.460 --> 15:45.550
So this one will have to handle on the enemy itself.

15:45.550 --> 15:48.940
I'm going to just go to enemy over here.

15:52.330 --> 15:53.320
And I'm going to make it.

15:53.320 --> 15:55.330
Oh it's worth oh it is virtual void.

15:55.330 --> 15:55.810
Okay.

15:55.810 --> 16:02.380
So on the enemy mushroom we need to get a private box Collider 2D Collider.

16:02.380 --> 16:05.770
Then we need to override awake and it cannot be called Collider.

16:05.770 --> 16:08.980
So I'm going to be calling this as CD.

16:09.900 --> 16:10.530
Sorry.

16:10.530 --> 16:14.280
Then we need to override awake and over here.

16:14.280 --> 16:17.370
We need to do CD equals to get component of a box collider.

16:17.460 --> 16:21.990
And then we're going to go somewhere here.

16:21.990 --> 16:25.080
We're going to override die method.

16:25.080 --> 16:29.280
And in here we're going to do CD enabled equals to false.

16:29.580 --> 16:30.210
Perfect.

16:30.210 --> 16:31.410
So we're going to disable Collider.

16:31.410 --> 16:33.150
And Mushroom can fall down.

16:33.330 --> 16:37.440
And I think it would be a good idea to disable damage trigger area.

16:37.440 --> 16:40.260
So player cannot be damaged accidentally.

16:40.590 --> 16:41.010
Um.

16:43.190 --> 16:45.500
I don't have a better place for this right now.

16:45.500 --> 16:48.710
So I'm going to just maybe in a collision, I don't know.

16:50.540 --> 16:51.380
I'll just do it above.

16:51.380 --> 16:51.680
For now.

16:51.680 --> 16:53.210
I'm going to do serialize field.

16:55.210 --> 16:55.510
Um.

16:57.350 --> 16:58.550
Centralized field.

16:59.060 --> 17:00.860
Protected game object.

17:01.250 --> 17:01.520
Uh.

17:01.520 --> 17:03.500
Damage trigger.

17:04.370 --> 17:08.270
Let's put a space here so it's a bit easier to see.

17:12.610 --> 17:15.280
And then when we die, we're going to do damage.

17:15.280 --> 17:18.010
Trigger set, active pulse.

17:19.170 --> 17:19.710
All right.

17:19.710 --> 17:21.780
Bunch of things that are helpful.

17:21.780 --> 17:24.510
Let's rename this to handle death rotation.

17:24.510 --> 17:25.830
Okay, a bit better.

17:26.460 --> 17:28.710
Uh, yeah yeah yeah yeah yeah yeah.

17:28.710 --> 17:29.340
Let's go.

17:29.340 --> 17:30.210
Now, let's see.

17:30.210 --> 17:32.160
This supposed to be cool.

17:32.370 --> 17:33.570
Supposed to be fine.

17:33.570 --> 17:37.320
It's going to be different for the enemies that have an rigidbody kinematic, because we're going to

17:37.320 --> 17:38.910
need to switch it off to dynamic.

17:38.910 --> 17:40.920
But other than that, it's good.

17:41.340 --> 17:42.960
Wait, I need more mushrooms.

17:49.040 --> 17:51.230
Oh my God, what is happening?

17:51.950 --> 17:53.060
Are has not been assigned.

17:53.090 --> 17:53.780
I'm so sorry.

17:53.780 --> 17:57.200
We need to assign this damage trigger.

17:57.230 --> 17:58.820
Damage trigger.

17:59.600 --> 17:59.900
Okay.

17:59.900 --> 18:00.710
This is good.

18:02.070 --> 18:03.420
Let me place one here.

18:03.420 --> 18:05.040
This one can be here.

18:05.400 --> 18:06.870
And this one over here.

18:06.870 --> 18:07.740
Let's go.

18:13.700 --> 18:14.150
Now.

18:14.150 --> 18:15.140
He's not dying.

18:15.170 --> 18:16.310
Why not?

18:16.880 --> 18:17.960
How it's okay.

18:19.900 --> 18:22.540
Yeah, this looks cool, I like it.

18:23.710 --> 18:25.060
Wow, this is so fun.

18:25.060 --> 18:26.590
I like how it works.

18:26.590 --> 18:34.390
So if you want him to bounce a bit higher, you can increase, um, death impact here.

18:34.390 --> 18:38.710
And if you want him to rotate slower or higher, you can change this value over here.

18:38.710 --> 18:40.000
Simple as that.

18:40.540 --> 18:41.020
Um.

18:43.360 --> 18:46.390
Maybe I'll rename this to Death Impact.

18:46.510 --> 18:47.140
What do we need?

18:47.140 --> 18:48.670
We need some sort of speed.

18:48.670 --> 18:49.510
Death impact.

18:49.510 --> 18:50.050
Speed.

18:50.080 --> 18:50.800
I don't know.

18:51.620 --> 18:56.360
And I make it equals to five by default, and this one going to be equals to 150 by default.

18:56.630 --> 18:56.960
Okay.

18:56.960 --> 18:59.210
So we don't have to set it on each enemy.

18:59.210 --> 19:01.340
Also let's do this for idle duration.

19:02.000 --> 19:03.380
And move speed as well.

19:03.410 --> 19:03.920
Why not?

19:03.920 --> 19:07.550
So we have some value always when we place an enemy on the level.

19:08.090 --> 19:10.250
I mean, making a new enemy.

19:10.760 --> 19:13.280
Um, yeah, that's pretty good for now.

19:13.280 --> 19:18.140
Oh, there were some sort of a misbehavior when I jumped on his head, right, I was damaged.

19:18.200 --> 19:21.200
Let me see what we can do about that right now.

19:21.200 --> 19:22.040
What was that?

19:25.940 --> 19:32.180
I think for this we can take the player and maybe take his enemy check and place it a bit lower.

19:39.010 --> 19:39.490
Yeah.

19:39.490 --> 19:40.690
Okay, good.

19:40.720 --> 19:41.620
Pew, pew!

19:41.770 --> 19:42.070
Yeah.

19:42.070 --> 19:43.570
This is so fun, I like it.

19:44.290 --> 19:48.160
All right, I'll see you in the next video.
