- [Voiceover] So now we'll create a mouse manager.…This will check for mouse clicks.…Particularly, it will check to see which items…have been clicked on in the 3D space.…If that item is interactive, it'll call the Select function.…It'll also deselect any items that were previously selected,…will also handle multi-select with the Shift key.…It might sound like a lot, but we've…already done some of this architecture.…So, to get started, I'm gonna create a new script.…Now let's edit the Mouse Manager.…I know I'm gonna want a generic collection,…so I'm gonna add Generic right now.…
Next, I need a list, a list of the interactives,…all the selections we have.…So I'm gonna say, "private List<Interactive>…"Selections = new".…I don't need to initialize anything,…so I'm gonna get rid of the Start function.…In the Update, I'm basically gonna wanna see…where I can escape the Update function as soon as I can,…so as not to waste any additional processing.…So the first thing I'll check for, is if the user…isn't clicking the mouse button, then ignore this.…
Author
Released
3/16/2016- 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
Duration
Views
Related Courses
-
Unity: Materials and Lighting
with Adam Crespi2h 20m Intermediate
-
-
Welcome31s
-
Using the exercise files1m 8s
-
-
1. Initial Setup
-
Load prebuilt level2m 20s
-
Add player positions2m 56s
-
RtsManager Script1m 56s
-
Player start informaton4m 31s
-
Navigation mesh2m 56s
-
Camera move2m 51s
-
-
2. Adding a Unit
-
Unit prefab3m 9s
-
Highlighting3m 21s
-
Selection achitecture4m 44s
-
Select2m 54s
-
Select on mouse click7m 31s
-
-
3. Navigation Mesh
-
Navigation support4m 27s
-
Navigation6m 33s
-
-
4. Unit Owner
-
Player object3m 20s
-
Player color4m 29s
-
-
5. HUD Map
-
Import HUD2m 27s
-
Map and viewport5m 48s
-
Map blips6m 32s
-
Unit tracking2m 46s
-
Visibility manager8m 42s
-
-
6. Unit Info & Credits
-
Unit info base4m 29s
-
Drone unit info4m 4s
-
Cash box2m 4s
-
-
7. HUD Actions
-
Actions manager6m 31s
-
Action behavior3m 30s
-
Create base action2m 38s
-
-
8. Command Base
-
Command base prefab1m 31s
-
Building follows mouse6m 31s
-
Express site viability3m 45s
-
Safe to build6m 52s
-
Create building6m 41s
-
Building cost4m 55s
-
Base creates drones7m 21s
-
-
9. Base AI
-
AI controller5m 20s
-
AI difficulty3m 38s
-
Do nothing6m 37s
-
AI support5m 9s
-
To base or not to base5m 38s
-
Create the building5m 5s
-
To drone or not to drone3m 33s
-
Create the drones3m 44s
-
Debug AI6m 7s
-
-
10. Battle
-
To battle or not to battle5m 48s
-
To battle6m 6s
-
Camera start2m 54s
-
Shoot9m 19s
-
Live unit info1m 43s
-
Destroy1m 52s
-
Prep for explosions4m 6s
-
Explosions3m 32s
-
-
Conclusion
-
Next steps1m
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Select on mouse click