Learn how to create a new battle window that extends the Unity 5 2D: Advanced UI generic window class. This new battle window class will be added to the window manager allowing you to open and close it like other pop ups in the game. Once created, you’ll be able to use the new battle window class to build the RPG combat system on top of.
- [Voiceover] Now it's time for us to connect up…our battle window to the window manager.…Inside of our advanced UI scripts window folder,…let's go ahead and create a new…C# Script and call this Battle Window.…then, let's open it up in MonoDevelop.…Here, we're going to have the battle window…extend the generic window class.…We'll also delete the start and update methods.…Save your code and go back into Unity.…We'll then drag the battle window script over…to the battle window game object.…
By selecting canvas, we can scroll down to our window…manager and add the new battle window to the window manager.…We'll also want to generate out a new windows Enum…and put it in the correct place, which will be AdvancedUI,…Scripts, Windows folder, and override…the previous windows Enums CS file.…At this point, out battle window is ready to go.…Let's look into how we can open it up.…To do this, let's go ahead and open up…the RandomMapTester class.…
We're going to want to keep a reference to the…battle window, so let's add a new private field typed…
- 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.