コード例 #1
0
 def __init__(self,bakery,tileSize,meshManager,heightScale):
     self.makeTile=meshManager.tileFactory(tileSize,collision=True)
     self.heightScale=heightScale
     Wrapped.__init__(self,FixWrapped(bakery,tileSize))
コード例 #2
0
    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)
コード例 #3
0
 def __init__(self, bakery, tileSize, meshManager, heightScale):
     self.makeTile = meshManager.tileFactory(tileSize, collision=True)
     self.heightScale = heightScale
     Wrapped.__init__(self, FixWrapped(bakery, tileSize))
コード例 #4
0
        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')