Exemplo n.º 1
0
 def makeRndWalls(self, game, amount, mapX, mapY, minWallWidth = 40.0, maxWallWidth=60.0):
     for x in range(amount):
         wall = BigWall( game, random.randrange(minWallWidth, maxWallWidth) )
         wall.setPos( Vec3(random.randrange( -mapX, mapX ), random.randrange( -mapY, mapY ), 0) )
         wall.visualNode.reparentTo(self.walls)
Exemplo n.º 2
0
 def makeBoundaryWalls(self, game, mapX = 100.0, mapY = 100.0):
     wall1 = BigWall(game, 2*mapX)
     wall1.setPos( Vec3(0, -mapY, 0) )
     wall1.visualNode.reparentTo(self.walls)
     wall2 = BigWall(game, 2*mapX)
     wall2.setPos( Vec3(0, mapY, 0) )
     wall2.visualNode.reparentTo(self.walls)
     wall3 = BigWall(game, 2*mapY)
     wall3.setRotation( 90 )
     wall3.setPos( Vec3(-mapX , 0, 0) )
     wall3.visualNode.reparentTo(self.walls)
     wall4 = BigWall(game, 2*mapY)
     wall4.setRotation( 90 )
     wall4.setPos( Vec3(mapX , 0, 0) )
     wall4.visualNode.reparentTo(self.walls)