wormhole level

This commit is contained in:
Page Asgardius 2022-04-22 11:27:37 -07:00
parent 3717a46d3d
commit 08ff27f85f
3 changed files with 97 additions and 48 deletions

BIN
level maps/wormhole.xcf Normal file

Binary file not shown.

145
r3.py
View file

@ -221,34 +221,59 @@ class Ast3(pygame.sprite.Sprite):
self.velocity = [0, 0] self.velocity = [0, 0]
def update(self): def update(self):
self.rect.move_ip(ex, ey) self.rect.move_ip(ex, ey)
player = Player(346,206)
css1 = Css(483,262)
css2 = Css(500,400)
css3 = Css(1582,470)
sat1 = Sat(550,-100)
sat2 = Sat(600,100)
sat3 = Sat(1240,120)
goal = Goal(1940,-16)
bus1 = Bus(600,656)
bus2 = Bus(1258,320)
bus3 = Bus(1970,524)
tc1 = Tc(854,472)
tc2 = Tc(1164,570)
tc3 = Tc(1760,680)
iss1 = Iss(878,140)
iss2 = Iss(1136,-6)
iss3 = Iss(1742,222)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
if int(datetime.datetime.utcnow().timestamp() % 2) == 1: if int(datetime.datetime.utcnow().timestamp() % 2) == 1:
background = Background('backgrounds/wormhole.png') background = Background('backgrounds/wormhole.png')
player = Player(346,206)
css1 = Css(551,381)
css2 = Css(772,399)
css3 = Css(1142,516)
sat1 = Sat(694,-85)
sat2 = Sat(871,121)
sat3 = Sat(1440,120)
goal = Goal(1940,-16)
bus1 = Bus(1544,488)
bus2 = Bus(1127,161)
bus3 = Bus(1936,146)
tc1 = Tc(1132,406)
tc2 = Tc(1124,270)
tc3 = Tc(1137,677)
iss1 = Iss(1136,23)
iss2 = Iss(1133,-117)
iss3 = Iss(1788,-129)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
else: else:
background = Background('backgrounds/galaxy.png') background = Background('backgrounds/galaxy.png')
player = Player(346,206)
css1 = Css(483,262)
css2 = Css(500,400)
css3 = Css(1582,470)
sat1 = Sat(550,-100)
sat2 = Sat(600,100)
sat3 = Sat(1240,120)
goal = Goal(1940,-16)
bus1 = Bus(600,656)
bus2 = Bus(1258,320)
bus3 = Bus(1970,524)
tc1 = Tc(854,472)
tc2 = Tc(1164,570)
tc3 = Tc(1760,680)
iss1 = Iss(878,140)
iss2 = Iss(1136,-6)
iss3 = Iss(1742,222)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
#crash = Crash() #crash = Crash()
#antenna = Antenna() #antenna = Antenna()
running = True running = True
@ -283,34 +308,58 @@ while running:
csfx.play() csfx.play()
elif event.key == pygame.K_r: elif event.key == pygame.K_r:
#this restart the game #this restart the game
player = Player(346,206)
css1 = Css(483,262)
css2 = Css(500,400)
css3 = Css(1582,470)
sat1 = Sat(550,-100)
sat2 = Sat(600,100)
sat3 = Sat(1240,120)
goal = Goal(1940,-16)
bus1 = Bus(600,656)
bus2 = Bus(1258,320)
bus3 = Bus(1970,524)
tc1 = Tc(854,472)
tc2 = Tc(1164,570)
tc3 = Tc(1760,680)
iss1 = Iss(878,140)
iss2 = Iss(1136,-6)
iss3 = Iss(1742,222)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
if int(datetime.datetime.utcnow().timestamp() % 2) == 1: if int(datetime.datetime.utcnow().timestamp() % 2) == 1:
background = Background('backgrounds/wormhole.png') background = Background('backgrounds/wormhole.png')
player = Player(346,206)
css1 = Css(551,381)
css2 = Css(772,399)
css3 = Css(1142,516)
sat1 = Sat(694,-85)
sat2 = Sat(871,121)
sat3 = Sat(1440,120)
goal = Goal(1940,-16)
bus1 = Bus(1544,488)
bus2 = Bus(1127,161)
bus3 = Bus(1936,146)
tc1 = Tc(1132,406)
tc2 = Tc(1124,270)
tc3 = Tc(1137,677)
iss1 = Iss(1136,23)
iss2 = Iss(1133,-117)
iss3 = Iss(1788,-129)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
else: else:
background = Background('backgrounds/galaxy.png') background = Background('backgrounds/galaxy.png')
player = Player(346,206)
css1 = Css(483,262)
css2 = Css(500,400)
css3 = Css(1582,470)
sat1 = Sat(550,-100)
sat2 = Sat(600,100)
sat3 = Sat(1240,120)
goal = Goal(1940,-16)
bus1 = Bus(600,656)
bus2 = Bus(1258,320)
bus3 = Bus(1970,524)
tc1 = Tc(854,472)
tc2 = Tc(1164,570)
tc3 = Tc(1760,680)
iss1 = Iss(878,140)
iss2 = Iss(1136,-6)
iss3 = Iss(1742,222)
ast1 = Ast1(120,200)
ast2 = Ast2(300,100)
ast3 = Ast3(500,150)
wall1 = Wallh(-100,-200)
wall2 = Wallh(2150,-200)
wall3 = Wallv(-200,-200)
wall4 = Wallv(-200,800)
live = True live = True
complete = False complete = False
if music: if music: