Join Dan Violet Sagmiller for an in-depth discussion in this video Cash box, part of Build a Real-Time Strategy Game with Unity 5.
- [Voiceover] So, now we have a map.…We also have the drone information…being able to be displayed.…The next thing we need is for this…text area to show the credits.…How much money do we have?…I'll stop the game.…I'll go into the Scripts folder.…I'll go into the HUD and inside of the HUD code,…I'm gonna create a class called CashBoxManager.…And now I'll edit CashBoxManager.…Now this is gonna be using UI elements again,…so I'm gonna add the using statement for that.…
Using UnityEngine.UI.…I also need to know the text field to change…so that we can keep updating the credit information.…Now, I don't need any initialization here,…so I'm gonna delete that.…In the update method, I'm gonna set the cash text.…So let's say CashField.text =…and let's start with a cash symbol,…plus I'll put a little space in there as well,…and I want to covert the float version…of the credits into an integer form.…
I don't want decimals to show up here.…I just want the user to see solid credit information.…So we'll pass it in as an int, but we're gonna say…
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
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.