Example #1
0
    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()
Example #2
0
    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()
Example #3
0
 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)
Example #4
0
 def unload():
     GameManager.currentScreen.unload()
     ShaderManager.unload()
     TextureManager.unload()
Example #5
0
 def bind(self):
     tm.bind(self.fontTexture)
Example #6
0
 def setKey(self, key):
     self.texKey = tm.key(key)
Example #7
0
 def display(self):
     sm.updateLink("texture", "model", self.model.matrix)
     tm.bind(self.texKey)
     self.shape.display()
Example #8
0
    def display():
        sm.updateLink("texture-hud", "model", Hud.model.matrix)

        tm.bind("hud")
        Hud.shape.display()