RPG Spell Casting System

Let’s create a class for a spell casting system. First, let’s create the class.

Now lets create a series of spells for our wizard by creating our wizard C# script.

Now let’s create a cast a spell method. We need to add this inside the spell script.

Now the wizard will cast the spell in the update method of wizard when the space bar is pressed. We can also set a minimum so we can set the level and exp that we are currently at(1) and then in our inspector, we can state what the necessary exp levels are for casting the spell.

--

--

Unity Developer and Software Engineer who loves making games with GameDevHQ

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ