Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

can i have some sort of scoreboard in unity?

Recommended Posts

Posted · Original PosterOP

im creating a 2d game called hole digger in unity for lols but i cant figure out how to make a button add a number to a text box every time its pressed. also i want the shovel to move down and back up and for every dig i want the camera to move down. Of course this will mean im going to need to add more ground panels. and a way to zoom in the camera and have it kind of follow the shovel. Is there any way to do this? thanks for the help

Link to post
Share on other sites

Of course, this is possible.  For the text box you should use a UI Element and change its content in some sort of "GameManager". By following this pattern you could implement achievements as well. To make the shovel move you'd have to create sprites and animate the states of the shovel. The states can be used to trigger the animations by code. To add more game panels you should consider "recycling" the prefabs by implementing an object pooling system. This would mean you'd instantiate 20 prefabs for your ground and put them below the bottom screen edge as soon as they are destroyed. That can save you a lot of memory!

Since it doesn't seem like you have a lot of experience in programming neither in Unity I think it would be more helpful for you to take some beginner classes in Unity and C#! 

"I speak English very well, bröcklersweiß und nier zu schnell"

-- Probably the favorite quote from bavarian students

Codepen http://codepen.io/MoVo99/

Software Skills

  • HTML, CSS & Client Side JavaScript
  • PHP (Laravel & Lumen)
  • JavaScript (NodeJs with Express)
  • Java (Android SDK; Bukkit SDK)
  • Ruby On Rails (Just learning.... 20%)
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now