]> Skullheadx's Git Forge - Pygame-Jam.git/commitdiff
a
authorlbcmk <30442978+lbcmk@users.noreply.github.com>
Mon, 11 Jul 2022 18:36:40 +0000 (14:36 -0400)
committerlbcmk <30442978+lbcmk@users.noreply.github.com>
Mon, 11 Jul 2022 18:36:40 +0000 (14:36 -0400)
Function/Portal.py
main.py

index 16f3b9d0e31b8b40beb3433b0cdd868e500fa5ea..8d94ebc00862fee9c6698f2301035d914b03459b 100644 (file)
@@ -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 ab84c277ccc1c91bdc3c9695ffe34021a43ac179..a401dd6290292081eb5069730c94bf4223fa4ae8 100644 (file)
--- 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: