SpielfeldV3
Feld ohne Spezialeffekte (Bombe etc.)
field.py — Python Source, 19 KB (19839 bytes)
Dateiinhalt
# -*- coding: utf-8 -*- #author: Mario G. #date: 25.03.2013 #version: 1.3 #name: final from visual import * #scene.stereo="redcyan" class standartfield(frame): def __init__(self, col=color.white, position=(0,0,0), visible=True): frame.__init__(self) self.field=box(frame=self, pos= position, length=2, width=2, height=0.03, color=col) #mention=label(pos=(0,0,0),text='Start') class startfield(frame): def __init__(self, col=color.yellow, positionStart=(0,0,0), visible=True): frame.__init__(self) self.startground=box(frame=self, pos= positionStart, length=8, width=8, height=1, color=col, material=materials.emissive) #mention=label(pos=(0,0,0),text='Start') self.player1= standartfield(position=(-2,1,-2), col= color.orange) self.player2= standartfield(position=(-2,1,2), col= color.orange) self.player3= standartfield(position=(2,1,-2), col= color.orange) self.player4= standartfield(position=(2,1,2), col= color.orange) class groupedfield (frame): def __init__(self, farbeGround= color.magenta, farbeSpezial=color.green, farbePyramide=color.green, groupedfieldPosition=(0,0,0)): frame.__init__(self) #self.ground= box(pos=(0,0,10), length= 80, width= 80, height= 0.1, color= farbeGround, frame= self) self.feld1= standartfield(position=(8,1,0),col=farbeGround) self.feld2= standartfield(position=(13,2, 0),col=farbeGround) self.feld3= standartfield(position=(18,3, 0),col=farbeGround) self.feld4= standartfield(position=(23,4,0),col=farbeGround) self.feld5= standartfield(position=(23,3,5),col=farbeGround) self.feld6= standartfield(position=(23,2,10),col=farbeGround) self.feld7= standartfield(position=(23,1,15),col=farbeGround) self.feld8= standartfield(position=(23,2,20),col=farbeGround) self.feld9= standartfield(position=(23,3,25),col=farbeGround) self.feld10= standartfield(position=(23,4,30),col=farbeGround) self.feld11= standartfield(position=(18,3,30),col=farbeGround) self.feld12= standartfield(position=(13,2,30),col=farbeGround) self.feld13= standartfield(position=(8,1,30),col=farbeGround) self.feld14= standartfield(position=(3,2,30),col=farbeGround) self.feld15= standartfield(position=(-2,3,30),col=farbeGround) self.feld16= standartfield(position=(-7,4,30),col=farbeGround) self.feld17= standartfield(position=(-7,3,25),col=farbeGround) self.feld18= standartfield(position=(-7,2,20),col=farbeGround) self.feld19= standartfield(position=(-7,1,15),col=farbeGround) self.feld20= standartfield(position=(-7,2,10),col=farbeGround) self.feld21= standartfield(position=(-7,3,5),col=farbeGround) self.feld22= standartfield(position=(-7,4,0),col=farbeGround) self.feld23= standartfield(position=(-2,3,0),col=farbeGround) self.feld24= standartfield(position=(3,2,0),col=farbeGround) # self.feldA= standartfield(position=(8,1,-5),col=farbeGround) self.feldB= standartfield(position=(28,1,15),col=farbeGround) self.feldC= standartfield(position=(8,1,35),col=farbeGround) self.feldD= standartfield(position=(-12,1,15),col=farbeGround) self.feldAA= standartfield(position=(8,1,-10),col=farbeGround) self.feldBB= standartfield(position=(33,1,15),col=farbeGround) self.feldCC= standartfield(position=(8,1,40),col=farbeGround) self.feldDD= standartfield(position=(-17,1,15),col=farbeGround) # #self.feldAv= standartfield(position=(8,2,5),col=farbeSpezial, visible=False) #self.feldAAv= standartfield(position=(8,3,10),col=farbeSpezial, visible=False) self.feldBv= standartfield(position=(18,2,15),col=farbeSpezial, visible=False) self.feldBBv= standartfield(position=(13,3,15),col=farbeSpezial, visible=False) #self.feldCv= standartfield(position=(8,2,25),col=farbeSpezial, visible=False) #self.feldCCv= standartfield(position=(8,3,20),col=farbeSpezial, visible=False) self.feldDv= standartfield(position=(-2,2,15),col=farbeSpezial, visible=False) self.feldDDv= standartfield(position=(3,3,15),col=farbeSpezial, visible=False) self.feldE= standartfield(position=(8,4,15), col=farbeSpezial, visible=False) self.deko1= pyramid(pos=(8,4,15), size=(5,5,5), axis=(0,-1,0), color=farbePyramide, visible= True, material=materials.chrome) self.deko2= pyramid(pos=(8,4,15), size=(5,5,5), axis=(0,1,0), color=farbePyramide, visible= True, material=materials.chrome) # self.feld1.frame=self self.feld2.frame=self self.feld3.frame=self self.feld4.frame=self self.feld5.frame=self self.feld6.frame=self self.feld7.frame=self self.feld8.frame=self self.feld9.frame=self self.feld10.frame=self self.feld11.frame=self self.feld12.frame=self self.feld13.frame=self self.feld14.frame=self self.feld15.frame=self self.feld16.frame=self self.feld17.frame=self self.feld18.frame=self self.feld19.frame=self self.feld20.frame=self self.feld21.frame=self self.feld22.frame=self self.feld23.frame=self self.feld24.frame=self self.feldA.frame=self self.feldB.frame=self self.feldC.frame=self self.feldD.frame=self self.feldE.frame=self self.feldAA.frame=self self.feldBB.frame=self self.feldCC.frame=self self.feldDD.frame=self #self.feldAv.frame=self self.feldBv.frame=self #self.feldCv.frame=self self.feldDv.frame=self #self.feldAAv.frame=self self.feldBBv.frame=self #self.feldCCv.frame=self self.feldDDv.frame=self self.deko1.frame=self self.deko2.frame=self def special(self, sichtbar): if sichtbar==True: self.feldAv.visible=True self.feldAAv.visible=True self.feldBv.visible= True self.feldBBv.visible=True self.feldCv.visible= True self.feldCCv.visible= True self.feldDv.visible= True self.feldDDv.visible= True self.feldE.visible= True self.deko2.visible= False else: self.feldAv.visible=False self.feldAAv.visible=False self.feldBv.visible= False self.feldBBv.visible=False self.feldCv.visible= False self.feldCCv.visible= False self.feldDv.visible= False self.feldDDv.visible= False self.feldE.visible= False self.deko2.visible= True class felsen(frame): def __init__(self): frame.__init__(self) #steina=box(pos=(0,0,0), length=16, height=2, width=16, frame=self) #steinb=box(pos=(2,3,0), length=5, height=10, width=8, frame=self) #steinc=box(pos=(1,3,-5), length=12, height=4, width=8, frame=self) #steind=box(pos=(-3,1,-1), length=8, height=2, width=12, frame=self) self.feld0=standartfield(position=(-5,-1.5,20)) self.feld0.frame = self self.feld1=standartfield(position=(-5,0,15)) self.feld1.frame = self self.feld2=standartfield(position=(-5,1.5,10),col=color.red) #portfeldEnde self.feld2.frame=self self.feld2a=standartfield(position=(0,1.5,10),col=color.red) #portfeldEnde2 self.feld2b=standartfield(position=(5,1.5,10),col=color.red) #portfeldEnde3 self.feld3=standartfield(position=(-5,3,5)) self.feld4=standartfield(position=(-5,4.5,0)) self.feld5=standartfield(position=(-5,6,-5)) self.feld6=standartfield(position=(-5,7.5,-10)) self.feld7=standartfield(position=(0,9,-10)) self.feld8=standartfield(position=(5,10.5,-10)) self.feld9=standartfield(position=(10,12,-10)) self.feld10=standartfield(position=(15,13.5,-10)) self.feld10a=standartfield(position=(20,13.5,-10)) self.feld11=standartfield(position=(20,15,-5)) self.feld12=standartfield(position=(20,16.5,0)) self.feld13=standartfield(position=(20,18,5)) self.feld14=standartfield(position=(20,19.5,10)) self.feld15=standartfield(position=(15,21,10)) self.feld16=standartfield(position=(10,22.5,10),col=color.red) #p-1 self.feld17=standartfield(position=(5,24,10) ,col=color.red) #portfeldAnfangMitte self.feld18=standartfield(position=(5,25.5,5),col=color.red) #p+1 self.feld19=standartfield(position=(5,27,0)) self.feld20=standartfield(position=(5,28.5,-5)) self.feld21=standartfield(position=(5,30,-10)) self.feld22=standartfield(position=(5,31.5,-15)) self.feld23=standartfield(position=(5,33,-20)) self.feld24=standartfield(position=(5,33.5,-25)) # self.feld2a.frame=self self.feld2b.frame=self self.feld3.frame=self self.feld4.frame=self self.feld5.frame=self self.feld6.frame=self self.feld7.frame=self self.feld8.frame=self self.feld9.frame=self self.feld10.frame=self self.feld11.frame=self self.feld12.frame=self self.feld13.frame=self self.feld14.frame=self self.feld15.frame=self self.feld16.frame=self self.feld17.frame=self self.feld18.frame=self self.feld19.frame=self self.feld20.frame=self self.feld21.frame=self self.feld22.frame=self self.feld23.frame=self self.feld24.frame=self self.feld10a.frame=self # self.derfels=box(pos=(5,10,0), width=4, length=4, height=32, color= color.blue, material=materials.plastic) self.derfels2=box(pos=(5,35,0), width=4, length=12, height=4, color= color.blue, material=materials.plastic) self.derfels3=box(pos=(1,27,0), width=4, length=4, height=15, color= color.blue, material=materials.plastic) self.derfels4=box(pos=(9,27,0), width=4, length=4, height=15, color= color.blue, material=materials.plastic) self.derfels.frame=self self.derfels2.frame=self self.derfels3.frame=self self.derfels4.frame=self ############################## #nutze groupedfield, variiere Koordinaten start=startfield() # erstePlatte=standartfield(position=(-0,1,6), col=color.orange) platte1=standartfield(position=(0,2,11)) platte2=standartfield(position=(0,3,17)) platte3=standartfield(position=(0,4,22)) platte4=standartfield(position=(0,5,27)) platte5=standartfield(position=(0,6,32)) platte6=standartfield(position=(0,7,37)) platte7=standartfield(position=(5,6,37)) platte8=standartfield(position=(10,5,37)) platte9=standartfield(position=(15,4,37)) platte10=standartfield(position=(20,3,37)) platte11=standartfield(position=(25,2,37)) platte12=standartfield(position=(30,1,37)) platte13=standartfield(position=(35,0,37)) platte14=standartfield(position=(40,-1,37)) platte15=standartfield(position=(45,-2,37), col=color.green) platte16=standartfield(position=(50,-3,37), col=color.green) platte17=standartfield(position=(55,-4,37), col=color.green) platte18=standartfield(position=(60,-5,37), col=color.green) platte19=standartfield(position=(65,-6,37), col=color.green) platte20=standartfield(position=(70,-7,37), col=color.green) platte21=standartfield(position=(75,-8,37), col=color.green) platte22=standartfield(position=(80,-9,37), col=color.green) platte23=standartfield(position=(85,-10,37), col=color.green) platte24=standartfield(position=(90,-11,37), col=color.green) # platte25=standartfield(position=(45,-2,42)) platte26=standartfield(position=(45,-2,47)) platte27=standartfield(position=(45,-2,52)) platte28=standartfield(position=(45,-2,57)) platte29=standartfield(position=(45,-2,62)) platte29=standartfield(position=(45,-2,67)) platte30=standartfield(position=(50,-3,67)) platte31=standartfield(position=(55,-4,67)) platte32=standartfield(position=(60,-5,67)) platte33=standartfield(position=(65,-6,67)) platte34=standartfield(position=(70,-7,67)) platte35=standartfield(position=(75,-8,67)) platte36=standartfield(position=(80,-9,67)) platte37=standartfield(position=(85,-10,67)) platte38a=standartfield(position=(90,-11,67)) platte38=standartfield(position=(90,-10,62)) platte39=standartfield(position=(90,-9,57)) platte40=standartfield(position=(90,-8,52)) platte41=standartfield(position=(90,-9,47)) platte42=standartfield(position=(90,-10,42)) platte43=standartfield(position=(90,-11,37)) platte44=standartfield(position=(90,-10,32)) platte45=standartfield(position=(90,-9,27)) platte46=standartfield(position=(90,-8,22)) platte47=standartfield(position=(90,-7,17)) platte48=standartfield(position=(90,-6,12)) platte49=standartfield(position=(90,-5,7)) platte50=standartfield(position=(90,-4,2)) platte51=standartfield(position=(90,-3,-2)) platte52=standartfield(position=(90,-2,-7)) platte53=standartfield(position=(90,-1,-12)) # hindernis1=felsen() hindernis1.pos=(95,2,-37) # platte54=standartfield(position=(100,36, -67)) platte55=standartfield(position=(100,37, -72)) platte56=standartfield(position=(100,38, -77)) platte57=standartfield(position=(100,39, -82)) platte58=standartfield(position=(100,40, -87)) platte59=standartfield(position=(100,41, -92)) platte60=standartfield(position=(100,42, -97))#high-edge platte61=standartfield(position=(95,41, -97)) platte62=standartfield(position=(90,40, -97)) platte63=standartfield(position=(85,39, -97)) platte64=standartfield(position=(80,38, -97)) platte65=standartfield(position=(75,37, -97)) platte66=standartfield(position=(70,36, -97)) platte67=standartfield(position=(65,35, -97)) platte68=standartfield(position=(60,34, -97)) platte69=standartfield(position=(55,33, -97)) platte70=standartfield(position=(50,32, -97)) platte71=standartfield(position=(45,31, -97)) platte72=standartfield(position=(40,30, -97)) platte73=standartfield(position=(35,29, -97),col=color.green) platte74=standartfield(position=(30,28, -97),col=color.green) #low platte75=standartfield(position=(25,29, -97),col=color.green) platte76=standartfield(position=(20,30, -97)) platte77=standartfield(position=(15,31, -97)) platte78=standartfield(position=(10,32, -97)) platte79=standartfield(position=(5,33, -97)) platte80=standartfield(position=(0,34, -97)) platte81=standartfield(position=(-5,35, -97)) platte82=standartfield(position=(-10,36, -97)) platte83=standartfield(position=(-15,37, -97)) platte84=standartfield(position=(-20,38, -97)) platte85=standartfield(position=(-25,39, -97)) platte86=standartfield(position=(-30,40, -97)) platte87=standartfield(position=(-35,41, -97)) platte88=standartfield(position=(-40,42, -97)) # hindernis2=groupedfield() hindernis2.pos=(-79,41,-111) hindernis1.ereignis=False # platte89=standartfield(position=(-71,42, -66)) platte90=standartfield(position=(-71,41, -61)) platte91=standartfield(position=(-71,40, -56)) platte92=standartfield(position=(-71,39, -51)) platte93=standartfield(position=(-71,38, -46)) platte94=standartfield(position=(-71,37, -41)) platte95=standartfield(position=(-71,36, -36)) platte96=standartfield(position=(-71,35, -31)) platte97=standartfield(position=(-71,34, -26)) platte98=standartfield(position=(-71,33, -21)) platte99=standartfield(position=(-71,32, -16)) platte100=standartfield(position=(-71,31, -11)) # platte101=standartfield(position=(-71,42, -127)) platte102=standartfield(position=(-71,41, -132)) platte103=standartfield(position=(-71,40, -137)) platte104=standartfield(position=(-71,39, -142)) platte105=standartfield(position=(-71,38, -147)) platte106=standartfield(position=(-71,37, -152)) platte107=standartfield(position=(-71,36, -157)) platte108=standartfield(position=(-71,35, -162)) platte109=standartfield(position=(-71,34, -167)) platte110=standartfield(position=(-71,33, -172)) platte111=standartfield(position=(-71,32, -177)) platte112=standartfield(position=(-71,31, -182)) # platte113=standartfield(position=(-101,42, -96)) platte113=standartfield(position=(-106,41, -96)) platte113=standartfield(position=(-111,40, -96)) platte113=standartfield(position=(-116,39, -96)) platte113=standartfield(position=(-121,38, -96)) platte113=standartfield(position=(-126,37, -96)) platte113=standartfield(position=(-131,36, -96)) platte113=standartfield(position=(-136,35, -96)) platte113=standartfield(position=(-141,34, -96)) platte113=standartfield(position=(-146,33, -96)) platte113=standartfield(position=(-151,32, -96)) platte113=standartfield(position=(-156,31, -96)) # teleport1=ellipsoid(pos=(-161,28,-96),length=10, width=10, height=0.5, color=color.yellow) teleport2=ellipsoid(pos=(-71,28,-187),length=10, width=10, height=0.5, color=color.yellow) teleport3=ellipsoid(pos=(-71,28,-6),length=10, width=10, height=0.5, color=color.yellow) platteTP1=standartfield(position=(-161,30, -96), col=color.blue) platteTP2=standartfield(position=(-71,30, -187), col=color.blue) platteTP3=standartfield(position=(-71,30, -6), col=color.blue) # teleport1E=ellipsoid(pos=(-20,-30,100),length=10, width=10, height=0.5, color=color.blue) teleport2E=ellipsoid(pos=(0,-19, 65),length=10, width=10, height=0.5, color=color.blue) teleport3E=ellipsoid(pos=(20,-26, 80),length=10, width=10, height=0.5, color=color.blue) platteTP1E=standartfield(position=(-20,-29, 100)) platteTP2E=standartfield(position=(0,-18, 65)) platteTP3E=standartfield(position=(20,-25, 80)) # platte114=standartfield(position=(-20,-28, 95)) platte115=standartfield(position=(-20,-27, 90)) platte116=standartfield(position=(-20,-26, 85)) platte117=standartfield(position=(-20,-25, 80)) platte118=standartfield(position=(-20,-24, 75)) platte119=standartfield(position=(-20,-23, 70)) platte120=standartfield(position=(-20,-22, 65)) platte121=standartfield(position=(-20,-21, 60)) platte122=standartfield(position=(-20,-20, 55)) platte123=standartfield(position=(-15,-19, 55)) platte124=standartfield(position=(-10,-18, 55)) platte125=standartfield(position=(-5,-17, 55)) #platte126=standartfield(position=(0,-16, 55)) # platte127=standartfield(position=(0,-16, 55)) platte128=standartfield(position=(0,-17, 60)) #platte129=standartfield(position=(0,-18, 65)) # platte130=standartfield(position=(5,-17, 55)) platte131=standartfield(position=(10,-18, 55)) platte132=standartfield(position=(15,-19, 55)) platte133=standartfield(position=(20,-20, 55))#edge platte134=standartfield(position=(20,-21, 60)) platte135=standartfield(position=(20,-22, 65)) platte136=standartfield(position=(20,-23, 70)) platte137=standartfield(position=(20,-24, 75)) # platte138=standartfield(position=(0,-17, 50)) platte139=standartfield(position=(0,-18, 45)) platte140=standartfield(position=(0,-19, 40)) platte141=standartfield(position=(0,-20, 35)) platte142=standartfield(position=(0,-21, 30)) platte143=standartfield(position=(0,-22, 25)) platte144=standartfield(position=(0,-23, 20)) platte145=standartfield(position=(0,-24, 15)) platte146=standartfield(position=(0,-25, 10), col=color.orange) platte147=standartfield(position=(0,-26, 5), col=color.orange) platte148=standartfield(position=(0,-27, 0)) platte149=standartfield(position=(0,-28, -5)) platte150=standartfield(position=(0,-29, -10)) platte151=standartfield(position=(0,-30, -15)) platte152=standartfield(position=(0,-31, -20)) platte153=standartfield(position=(0,-32, -25)) platte154=standartfield(position=(0,-33, -30)) # zielground=box(pos=(0,-35, -35), length=8, width=8, height=1, color=color.red, material=materials.emissive) letztePlatte=standartfield(position=(0,-34,-35), col=(0.5, 0.5, 0.5)) #feldgruppe1= groupedfield() #feldgruppe1.special(ereignis)