Join Dan Violet Sagmiller for an in-depth discussion in this video Player object, part of Build a Real-Time Strategy Game with Unity 5.
- [Voiceover] Now we need to know who the unit belongs to.…Does it belong to Player 1, to Player 2?…What color is it?…Each unit will need to know this information.…Also, we want to know who the current player is,…since most things in the game…will revolve around their actions.…So we're gonna start by creating Player.cs in the scripts.…So I'll right-click, Create > C# Script,…and I'll call it "Player".…Now let's edit Player.…So now that we have our Player,…it will remain a MonoBehaviour,…but we don't need any functionality with it.…
So I'm gonna delete the two functions that come with it.…It will however hold on to information.…The first one is gonna be the player definition.…So if we go into this Definitions,…we see PlayerSetupDefinition.…So I'm gonna say "public PlayerSetupDefinition",…and I'll call it "Info", so anyone can get access to this…by typing in "Player.Info".…Next, I wanna know who the default player is.…This is gonna be important for a lot of our code…to understand quickly and easily who the default player is.…
AuthorDan Violet Sagmiller
- Adding player positions and start info
- Loading prebuilt levels
- Adding camera moves
- Adding a unit
- Supporting navigation
- Adding unit owners and player objects
- Importing and setting up a HUD map
- Adding unit info and credits
- Creating HUD actions
- Building a command base
- Adding artificial intelligence
- Adding battle actions
Skill Level Intermediate
Unity 5: 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
1. Initial Setup
2. Adding a Unit
3. Navigation Mesh
4. Unit Owner
5. HUD Map
6. Unit Info & Credits
7. HUD Actions
8. Command Base
9. Base AI
- 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.