From: Skullheadx <704277@pdsb.net> Date: Wed, 13 Jul 2022 21:11:59 +0000 (-0400) Subject: again X-Git-Url: http://git.skullheadx.com/nixos/projects.html?a=commitdiff_plain;h=53d40142c67604b6e1e6845a5c4a892281165212;p=Pygame-Jam.git again --- diff --git a/Game.py b/Game.py index 2b68eb9..cff414a 100644 --- a/Game.py +++ b/Game.py @@ -225,8 +225,10 @@ class Game: self.world.update(delta) self.fade = self.Transition.fade - if self.level == 3 and self.fade and isinstance(self.jeff, PhysicsBody) and not self.jeff.was_beaten: - self.saved_jeff = True + if self.level == 3 and self.fade: + if (isinstance(self.jeff, PhysicsBody) and not self.jeff.was_beaten) and (not (isinstance(self.jeff, Enemy) and self.jeff.position.y > 10000)): + self.saved_jeff = True + print('good') if self.level in [2, 5]: for particle in Setup.particles: diff --git a/PhysicsBody.py b/PhysicsBody.py index 43bfc7d..6fe4150 100644 --- a/PhysicsBody.py +++ b/PhysicsBody.py @@ -38,6 +38,7 @@ class PhysicsBody: elif is_jeff: self.display = pg.transform.scale(pg.image.load("Assets/enemy/Jeff_Death.png"), (200,200)) self.offset = pg.Vector2(-50,-160) + self.goon_skin = True else: self.display = pg.transform.scale(pg.image.load("Assets/skeleton/SKELETON.png"), (50,50)) self.offset = pg.Vector2(0, 10) @@ -109,6 +110,6 @@ class PhysicsBody: def draw(self, surf): # print(self.position, self.velocity) - # pg.draw.rect(surf, self.colour, get_display_rect(self.get_collision_rect()), border_radius=8) + pg.draw.rect(surf, self.colour, get_display_rect(self.get_collision_rect()), border_radius=8) surf.blit(self.display,get_display_rect(self.get_collision_rect()).topleft + self.offset) # surf.blit(self.display,get_display_rect(self.get_collision_rect()))