import pymunk.pygame_util
import pygame.draw
import pygame.surface
-from pygame.math import Vector2
from .constants import (SCREEN_SIZE, OBSTACLE_CATEGORY)
from .loader import loader
def __init__(self, shrublets):
super(Shrub, self).__init__()
for (x, y, r) in shrublets:
- vec = Vector2(0, int(r))
+ vec = pymunk.Vec2d(0, int(r))
STEPS = 18
vertices = [
- vec.rotate(angle) + (x, y)
+ vec.rotated_degrees(angle) + (x, y)
for angle in range(0, 360, 360/STEPS)]
vertices = [(v.x, v.y) for v in vertices]