That's enough talk, let's get to work. To begin with, we're only going to create the bottom-left corner of the HUD, because the items that are tracked by the rest of the HUD haven't been implemented yet. We'll build up the HUD more as we add to the game.
from direct.gui.DirectGui import * from pandac.PandaModules import *
__init__method. Here's the code for it:
class HUD: def __init__(self, fonts): self.modTS = TextureStage("Modulate") self.modTS.setMode(TextureStage.MModulate) self.createLLHUD(fonts) self.visible ...