def __init__(self,bakery,tileSize,meshManager,heightScale): self.makeTile=meshManager.tileFactory(tileSize,collision=True) self.heightScale=heightScale Wrapped.__init__(self,FixWrapped(bakery,tileSize))
def height(self,x,y): return 0 factories=[treeFactory.TreeFactory(),fernFactory.FernFactory()] t=meshManager.MeshManager(factories) tf=treeFactory.TreeFactory() ff=fernFactory.FernFactory() factories=[tf,ff] meshManager=meshManager.MeshManager(factories) size=600.0 tileFactory=meshManager.tileFactory(size) x=0.0 y=0.0 tile=Flat() tileNode=tileFactory(x,y,tile) tileNode.reparentTo(base.render) dlight = DirectionalLight('dlight') dlnp = render.attachNewNode(dlight) dlnp.setHpr(0, 0, 0) render.setLight(dlnp)
def __init__(self, bakery, tileSize, meshManager, heightScale): self.makeTile = meshManager.tileFactory(tileSize, collision=True) self.heightScale = heightScale Wrapped.__init__(self, FixWrapped(bakery, tileSize))
return 0 factories = [treeFactory.TreeFactory(), fernFactory.FernFactory()] t = meshManager.MeshManager(factories) tf = treeFactory.TreeFactory() ff = fernFactory.FernFactory() factories = [tf, ff] meshManager = meshManager.MeshManager(factories) size = 600.0 tileFactory = meshManager.tileFactory(size) x = 0.0 y = 0.0 tile = Flat() tileNode = tileFactory(x, y, tile) tileNode.reparentTo(base.render) dlight = DirectionalLight('dlight') dlnp = render.attachNewNode(dlight) dlnp.setHpr(0, 0, 0) render.setLight(dlnp) alight = AmbientLight('alight')