diff --git a/level maps/r3 level1.xcf b/level maps/r3 level1.xcf index 4895660..cff7777 100644 Binary files a/level maps/r3 level1.xcf and b/level maps/r3 level1.xcf differ diff --git a/r3.py b/r3.py index 2a4e6f3..1c9704a 100644 --- a/r3.py +++ b/r3.py @@ -149,7 +149,20 @@ class Bus(pygame.sprite.Sprite): #self.image = pygame.Surface((32, 32)) #self.image.fill(WHITE) #self.rect = self.image.get_rect() # Get rect of some size as 'image'. - self.rect = pygame.Rect(self.x,self.y,69, 120) + self.rect = pygame.Rect(self.x,self.y,118, 63) + self.velocity = [0, 0] + def update(self): + self.rect.move_ip(bx, by) +class Tc(pygame.sprite.Sprite): + def __init__(self,xset,yset): + pygame.sprite.Sprite.__init__(self) + self.x = xset + self.y = yset + self.image = pygame.image.load('sprites/tc.png') + #self.image = pygame.Surface((32, 32)) + #self.image.fill(WHITE) + #self.rect = self.image.get_rect() # Get rect of some size as 'image'. + self.rect = pygame.Rect(self.x,self.y,118, 63) self.velocity = [0, 0] def update(self): self.rect.move_ip(bx, by) @@ -199,6 +212,7 @@ sat1 = Sat(550,-100) sat2 = Sat(600,100) goal = Goal(3000,-100) bus1 = Bus(600,656) +tc1 = Tc(854,472) ast1 = Ast1(120,200) ast2 = Ast2(300,100) ast3 = Ast3(500,150) @@ -247,6 +261,7 @@ while running: sat2 = Sat(600,100) goal = Goal(3000,-100) bus1 = Bus(600,656) + tc1 = Tc(854,472) ast1 = Ast1(120,200) ast2 = Ast2(300,100) ast3 = Ast3(500,150) @@ -313,6 +328,10 @@ while running: live = False pygame.mixer.music.stop() csfx.play() + elif pygame.sprite.collide_rect(player, tc1): + live = False + pygame.mixer.music.stop() + csfx.play() elif pygame.sprite.collide_rect(player, goal): live = False complete = True @@ -325,6 +344,7 @@ while running: sat2.update() goal.update() bus1.update() + tc1.update() ast1.update() ast2.update() ast3.update() @@ -344,6 +364,7 @@ while running: screen.blit(sat2.image, sat2.rect) screen.blit(goal.image, goal.rect) screen.blit(bus1.image, bus1.rect) + screen.blit(tc1.image, tc1.rect) screen.blit(wall1.image, wall1.rect) screen.blit(wall2.image, wall2.rect) screen.blit(wall3.image, wall3.rect) diff --git a/sprites/tc.png b/sprites/tc.png new file mode 100644 index 0000000..57f2e37 Binary files /dev/null and b/sprites/tc.png differ