From: lbcmk <30442978+lbcmk@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:36:40 +0000 (-0400) Subject: a X-Git-Url: http://git.skullheadx.com/nixos/static/projects/dotfiles.html?a=commitdiff_plain;h=1d2ba2f1e51d8bff78f494557cc7c840cb4770e0;p=Pygame-Jam.git a --- diff --git a/Function/Portal.py b/Function/Portal.py index 16f3b9d..8d94ebc 100644 --- a/Function/Portal.py +++ b/Function/Portal.py @@ -26,14 +26,16 @@ class Transition: def draw(self, surf, playerPos, offset=(0,0)): offsetX = offset[0] offsetY = offset[1] - 25 - + coords = getWorldCoords(0, 0) coords[1] += self.portalYAnim a = (((offsetX-self.width/2) + coords[0], offsetY + coords[1]), (offsetX+coords[0], offsetY-self.height/2+coords[1]), (offsetX+self.width/2 + coords[0], offsetY+coords[1]), (offsetX + coords[0], offsetY+self.height/2 + coords[1])) portal_rect = (a[0][0], a[1][1], a[2][0], a[3][1]) - # print(a[0][0], a[1][1], a[2][0], a[3][1]) + # print(portal_rect) # print(playerPos[0], playerPos[1]) + + print(portal_rect, coords, playerPos) if(a[0][0] < playerPos[0]+self.width/2 < a[2][0] and a[1][1] < playerPos[1] < a[3][1]): # self.buttonStage += 0.1 diff --git a/main.py b/main.py index ab84c27..a401dd6 100644 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ is_running = True # scene = TransitionScene() scene = DevLevelSelect() old_level = 0 -level = 4 +level = 5 next_level = 0 while is_running: @@ -43,6 +43,8 @@ while is_running: scene = Game(3) case 4: scene = Game(4) + case 5: + scene = Game(7) old_level = level if level <= 1: