Skip to content

Commit

Permalink
made every game object resizable and fixed a line drawing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rutra8002 committed Jul 19, 2024
1 parent 5b0d92e commit 79cd9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def render_particles(self):
def lineDrawing(self, points):
for i in range(len(points)):
try:
pygame.draw.line(points[i], points[i + 1])
pygame.draw.line(self.screen, (255, 255, 255), points[i], points[i + 1])
except:
pygame.draw.line(self.screen, (255, 255, 255), points[i], points[0])

Expand Down
4 changes: 2 additions & 2 deletions classes/gameobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ def checkIfNormalMirror(self):
return False

def drawResizeOutline(self):
if isinstance(self, Mirror) and not self.checkIfNormalMirror():
if not self.checkIfNormalMirror():
print(self.checkIfNormalMirror())
classes.game.Game.movePoints(self.game, self.points, pygame.mouse.get_pos())
elif not isinstance(self, Flashlight):
elif not isinstance(self, Flashlight) or not isinstance(self, Corridor):
print(self.checkIfNormalMirror())
# Draw an outline around the object
pygame.gfxdraw.aapolygon(self.game.screen, self.points, (255, 255, 255))
Expand Down

0 comments on commit 79cd9bc

Please sign in to comment.