def __init__(self, pos, size): cx, cy = trans(pos) w, h = scale(size) x = cx - (w / 2) y = cy - (h / 2) sq = Rectangle(width=w, height=h, color=(120, 50, 50)) Stationary.__init__(self, sprite=sq) self.set_position((x, y)) self.draw()
def __init__(self, pos, size): cx, cy = trans(pos) w, h = scale(size) x = cx-(w/2) y = cy-(h/2) sq = Rectangle(width=w, height=h, color=(150, 210, 200)) Stationary.__init__(self, sprite=sq) self.set_position((x, y)) self.draw()