--- race-minefield.py 2004-11-11 21:56:42.635537232 +0200 +++ race.py 2004-11-11 23:46:04.924917608 +0200 @@ -573,6 +573,34 @@ hx += step return u , t +def LaserPathObstacle( level ) : + u , t = Union() , UnionBox() + + length = rand( 32 ) + 32 + height = rand( 16 ) - 8 + pathWidth = 12 - level + + t = RemoveSafetyTrack( x = length , z = length ) + + p = Point( 0 - pathWidth / 2 , 1 + height , length - 10 ) + u.add( Weapon( Point( 0 , 0 , 0 ) , type = Laser, frequencies = [ 5 ] , initialDelay = 0 ).rotate( 90 ).at( p ) ) + p = Point( 0 + pathWidth / 2 , 1 + height , length - 10 ) + u.add( Weapon( Point( 0 , 0 , 0 ) , type = Laser, frequencies = [ 5 ] , initialDelay = 0 ).rotate( 90 ).at( p ) ) + + p1 = Point( 0 - pathWidth / 2 , height , length ) + p2 = Point( 0 - 0.05 , height - 0.25 , -length ) + u.add( Box( p1 , p2 ) ) + p1 = Point( 0 + pathWidth / 2 , height , length ) + p2 = Point( 0 + 0.05 , height - 0.25 , -length ) + u.add( Box( p1 , p2 ) ) + + p = Point( 0 + pathWidth / 2 , 1 + height , -length + 10 ) + u.add( LaserDeflector( p , inverted = False ) ) + p = Point( 0 - pathWidth / 2 , 1 + height , -length + 10 ) + u.add( LaserDeflector( p , inverted = False ) ) + + return u , t + def LaserZigZagHurdleObstacle( level ) : u = Union() t = UnionBox() @@ -1369,6 +1397,7 @@ 'Hole' : ( 4 , True , HoleObstacle ) , 'LaserLadderHurdle' : ( 1 , True , LaserLadderHurdleObstacle ) , 'LaserMultiHurdle' : ( 1 , True , LaserMultiHurdleObstacle ) , +'LaserPath' : ( 10 , True , LaserPathObstacle ) , 'LaserZigZagHurdle' : ( 1 , True , LaserZigZagHurdleObstacle ) , 'HorisontalLaser' : ( 1 , False, HorisontalLaserObstacle ) , 'LeapFrog' : ( 1 , True , LeapFrogObstacle ) ,