Tuesday, June 14, 2011

Unity: Simple GUI

Well, aren't I just feeling productive today? Anyone else feel like a spam sandwich?

A basic GUI is in and working. I've created a separate GUI camera and layer group, incase I want to render 3D GUI elements over the gameplay. For now though, I'm simply using the OnGUI() method to draw a heart texture to the screen, one for each hitpoint the player currently has.

You can lose all of your hitpoints in the lava on level 2, but you don't currently die. You will however see the GUI update in real time as your hitpoints are depleted. I accomplished this entirely with magic. Possibly also a single line of basic code that makes posting about it seem kind of tacky. Maybe I should hold off on the updates until I make some significant advances...

...However, that TODO list is getting quite short!

I may just have to update it soon with the eleventybillion art assets I'll need to create. Well, aren't I glad I thought about that? Excuse me while I crawl under my desk and sob uncontrollably.

No comments:

Post a Comment