Jesse Freeman teaches you how to build an actor class which can be used to store data for the player and monsters in RPG games. The actor leverages a special class type in Unity called a ScriptableObject. ScriptableObject’s act like prefabs but are serialized instances of classes you can save into the asset folder of Unity projects.
- [Voiceover] Now we're ready to start building out…the data models for our player…and our monster when they enter combat.…In order to do this, we're gonna create a new actor class…inside of our battle system scripts folder.…Be sure to name this C# script actor.…And let's open it up in MonoDevelop.…We're gonna use something called a scriptable object.…The best way to think of scriptable objects…is like prefabs except they don't have any visual elements.…So where normally you would drag a game object…from the hierarchy into the project folder…and still be able to edit it, a scriptable object…allows us to serialize a class, store it inside…of our project folder and then reuse it…in several different places in our code.…
Because this will be a scriptable object,…we're gonna remove monobehavior and instead…replace it with scriptableobject.…We can also remove the start and update methods as well.…We're gonna create a generic actor…that will be able to represent the values…that our player and our monsters will have in the game.…
- Preparing the user interface
- Creating game and message windows
- Building a battle window
- Adding a monster and action buttons
- Creating an actor class
- Adding player and monster attack actions
- Triggering battles from the map
- Ending a battle
- Cleaning up the battle and attack systems
- Rewarding the player
Skill Level Intermediate
1. Preparing the UI
2. Message Window
3. The Battle Window
4. Actor Classes
5. Battle Actions
6. Cleaning Up Combat
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.