Oct-31-2019, 09:46 PM
if
I think you meant to do this
now - self.last >= self.cooldown
is true then its code will just counteract the one aboveI think you meant to do this
def update(self): self.pos += self.vel * self.game.dt self.rect.center = self.pos if self.game.player.weapon == 'boomerang': now = pg.time.get_ticks() if now - self.last >= self.cooldown: self.pos -= self.vel * self.game.dt else: self.pos += self.vel * self.game.dt self.rect.center = self.pos