A heart sprite for the health bar thingy in the upper right corner.
A spritefont to display text
A class called UIController that draws one heart per player hp in the upper left corner and displays the elapsed playtime in the upper right corner.
Changed player hp to 5 instead of 100, to avoid drawing 100 hearts on screen lmao
Added some stuff in GameManager to accomodate these features
Change to the way screenWidth and screenHeight works: they previously returned the screen resolution and not the windows resolution I think? At least screenWidth returned 3200 when I tested it, but it should work correctly now.
Right now, the spritefont is Arial, but we can of course change this later. I only used that one because it was the default option.
This PR contains the following:
UIController
that draws one heart per player hp in the upper left corner and displays the elapsed playtime in the upper right corner.GameManager
to accomodate these featuresscreenWidth
andscreenHeight
works: they previously returned the screen resolution and not the windows resolution I think? At leastscreenWidth
returned3200
when I tested it, but it should work correctly now.Right now, the spritefont is Arial, but we can of course change this later. I only used that one because it was the default option.
53