def display(transition): # Displays two parts for maps: # Displays fist layer 0 -> 3, then answers EntityManager to display entities and finally display layer 4 -> 7 sm.updateLink("texture", "model", MapRender.model.matrix) tm.bind(MapRender.currentTileSet) MapRender.shapeDown.display() em.EntityManager.display() sm.updateLink("texture", "model", MapRender.model.matrix) tm.bind(MapRender.currentTileSet) MapRender.shapeUp.display() if transition: MapRender.transitionShape.display()
def init(): Logger.info("GameManager", "Created") # Init systems TextureManager.init() TextManager.init() InputManager.init(Config.inputs) GameManager.cam = camera.Camera( 70.0, [0, 0, -2 ]) # FOV 70, Precise position of cam to render 18 * 12 tiles ShaderManager.init() GameManager.setCurrentScreen("menuscreen", [True]) GameManager.createCurrentScreen()
def __init__(self, info): self.fontTexture = tm.key(info["texture"]) self.infoFile = info["info"] self.sizeX = 0 self.sizeY = 0 self.numberChars = 1 self.chars = {} self.load(self.infoFile)
def unload(): GameManager.currentScreen.unload() ShaderManager.unload() TextureManager.unload()
def bind(self): tm.bind(self.fontTexture)
def setKey(self, key): self.texKey = tm.key(key)
def display(self): sm.updateLink("texture", "model", self.model.matrix) tm.bind(self.texKey) self.shape.display()
def display(): sm.updateLink("texture-hud", "model", Hud.model.matrix) tm.bind("hud") Hud.shape.display()