def collide(self, e): """see super""" if isinstance(e, SolidEntity): col = PEG_helpers.collideSide(self.pos,e.pos) self.pos -= col #if collide with ground if col.y > 0: self.grounded = True if col.x != 0: self.vel.x = 0
def collide(self, e): """see super""" if isinstance(e, SolidEntity): col = PEG_helpers.collideSide(self.pos,e.pos) self.pos -= col #if collide with ground if col.y > 0: self.grounded = True if col.x != 0: self.vel.x = 0