WEBVTT

00:06.880 --> 00:08.080
Welcome back.

00:08.140 --> 00:14.380
So now that we have got our project set up and we can run in debug mode, it's time to do some coding.

00:14.530 --> 00:21.760
Now all we've done so far is Add or a character base, which as we mentioned, is going to be the base

00:21.760 --> 00:26.380
class for the characters that we create in this project.

00:26.410 --> 00:31.930
Now I actually don't plan on creating an instance of or a character base.

00:31.960 --> 00:33.570
It's just a base class.

00:33.580 --> 00:39.250
We'll create the player character and the enemy character classes and those will inherit from character

00:39.250 --> 00:43.450
base, which means there are some things that we don't need in this class.

00:43.450 --> 00:51.790
And if we like, we could add the abstract specifier to the class macro, and that prevents this class

00:51.790 --> 00:54.370
from being able to be dragged into the level.

00:54.400 --> 01:00.670
Now, I already know that I'm not going to have the base class do any tick functionality and we don't

01:00.670 --> 01:02.980
need set up player input component either.

01:02.980 --> 01:09.200
We're going to configure input for the player character class, the one we'll be controlling.

01:09.200 --> 01:14.510
But the I controllers don't need input, so we're not going to set that up in the base class here.

01:14.510 --> 01:19.740
I'm going to actually remove set up player input component and the tick function altogether.

01:19.760 --> 01:21.740
Now we know what Beginplay does.

01:21.740 --> 01:27.530
We're going to remove the comment telling us about Beginplay and we know what constructors do.

01:27.560 --> 01:29.990
We're going to remove the comment for that as well.

01:29.990 --> 01:37.010
Those are just in the way and in a character base, we're going to remove these comments here as well.

01:37.490 --> 01:44.600
I'm going to change beacon of a tick to false as I don't see any immediate need for base character to

01:44.600 --> 01:45.170
tick.

01:45.200 --> 01:47.330
Let's remove the comment there.

01:47.360 --> 01:53.600
We'll remove the comment from beginplay and we don't need tick or set up player input component.

01:53.630 --> 02:01.580
We're removing those all together and now we have a stripped out bare bones base character class, which

02:01.580 --> 02:02.270
is great.

02:02.300 --> 02:08.660
We're going to use this to derive subclasses or child classes and I'd like to do that now.

02:08.780 --> 02:14.600
Now I'm not debugging any code at the moment so I can simply hit run and we'll compile and launch the

02:14.600 --> 02:15.740
editor from there.

02:15.860 --> 02:22.390
And here in the editor, we can go ahead and derive from the character base.

02:22.400 --> 02:29.420
Now to keep things organized, I'm going to want my classes in their own designated folders.

02:29.450 --> 02:36.530
Now I've already added this character base class, but I could put this in a character folder and that

02:36.530 --> 02:39.950
way all the character classes can be grouped together.

02:39.950 --> 02:41.930
So I'd like to do that now.

02:41.930 --> 02:48.710
I could do it from within writer or I could rearrange my project's structure in Explorer.

02:48.710 --> 02:55.670
So if I open my source folder here and go into Aura, I can add a character folder in both my private

02:55.670 --> 02:57.260
and public folders here.

02:57.260 --> 03:04.460
So I'm going to go ahead and add a new folder and call this character and I'm going to do the same thing

03:04.460 --> 03:06.020
in the private folder.

03:09.270 --> 03:12.300
And I'll move the CP into character.

03:12.330 --> 03:17.160
And back in the public, I'll move the H into character just like that.

03:17.400 --> 03:21.230
Now it takes a second, but Rider updates right away.

03:21.240 --> 03:27.870
And of course this is going to require that we make a new commit as this is now read.

03:27.870 --> 03:36.600
And if you do this in Visual Studio, what you have to do is close out of the IDE and delete your intermediate

03:37.470 --> 03:39.330
and your binaries folder.

03:40.070 --> 03:43.250
Then you can open your solution and compile again.

03:43.250 --> 03:50.090
And for Visual Studio, you'd right click on your project and generate Visual Studio project files.

03:50.210 --> 03:51.890
I'm opening writer.

03:53.130 --> 03:59.130
And before we compile and run, we're going to have to go into a character base here.

03:59.430 --> 04:06.630
And now that we've changed our folder structure, we can type in character slash or a character base

04:06.630 --> 04:07.200
there.

04:07.500 --> 04:11.100
And now we can successfully include the header file there.

04:11.130 --> 04:12.570
So I'm going to hit run.

04:14.140 --> 04:20.800
And here in the content drawer, I see that I now have a character folder in public and here's where

04:20.800 --> 04:23.110
I'll put my other character classes.

04:23.230 --> 04:25.060
So we'll go ahead and create those classes.

04:25.060 --> 04:30.280
I'm going to right click on a character base and create a C plus plus class derived from it.

04:30.280 --> 04:33.460
And I'll let this go into the character folder here.

04:33.460 --> 04:37.840
And I'm going to call this Aura character.

04:37.930 --> 04:40.690
This will be the player character that we control.

04:40.690 --> 04:42.860
So I'll go ahead and create the class.

04:42.880 --> 04:47.830
Now I have live coding off and my editor is set to not compile.

04:47.830 --> 04:53.050
That's just how I prefer for this project and it's asking if I'd like to edit the code.

04:53.050 --> 04:56.020
Now I'm going to click No, because I'm not done.

04:56.020 --> 04:57.610
I'm going to make one more class.

04:57.610 --> 05:02.560
I'm going to right click on Aura Character Base, create a C plus plus class derived from it.

05:02.590 --> 05:08.230
We've already created Aura character, but now we need an enemy class and I'm going to call this aura

05:08.260 --> 05:09.040
enemy.

05:09.070 --> 05:11.500
So we'll go ahead and create that class as well.

05:11.500 --> 05:17.870
And again, I'll click No, I'm going to handle the compiling myself and I'll go ahead and close out

05:17.870 --> 05:22.760
of the editor as we're going to compile and launch from the IDE.

05:23.180 --> 05:31.340
So now we have three character classes and or a character is derived from or a character base as is

05:31.370 --> 05:34.520
or an enemy they're both derived from or a character base.

05:34.520 --> 05:42.410
So now we can add things to Aura character base and are two derived classes will inherit those things.

05:42.770 --> 05:50.180
Okay, so now that we have our character base and our enemy and Aura characters, we're ready to start

05:50.180 --> 05:56.030
adding some features to the character base class that our other characters can inherit, and we're going

05:56.030 --> 05:58.400
to start that in the next video.

05:58.490 --> 06:00.920
So in the meantime, I'll make my commit.

06:00.950 --> 06:03.740
No need for me to show that to you every time.

06:03.740 --> 06:09.800
You can just assume that I'm committing after each lecture and I'll see you in the next video.
