자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
def update(self, world): if not self.time: p = world.get_p(self.x, self.y) if p.x < self.x: world.e.append(Entities.CannonBall(self.x, self.y, -1)) shot.play() elif p.x > self.x: world.e.append(Entities.CannonBall(self.x, self.y, 1)) shot.play() self.time = randint(120, 360) else: self.time -= 1