def proccess(self): victory = self.won() #adds in some decceleration and gravity self.decceleration() self.gravity() #compares moving objects for collisions #self.dynamicCollision() #compares moving to static objects for collisions self.staticCollision() #all moving objects are updated self.update() if len(self.dynamic)>0: if physics.rectangleOverlap(self.player.pos, self.dynamic[0].pos): victory = False return victory
def won(self): if physics.rectangleOverlap(self.player.pos, self.goal.pos): print("Victory") return False else: return True