From f6fcfa2cdf897291f3a49a22edbb2aad13870fb2 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sun, 11 Sep 2016 23:23:28 +0200 Subject: [PATCH] Replace pygame.math which is not supported by pygame-cffi yet. --- tabakrolletjie/obstacles.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tabakrolletjie/obstacles.py b/tabakrolletjie/obstacles.py index 071ca9f..5524717 100644 --- a/tabakrolletjie/obstacles.py +++ b/tabakrolletjie/obstacles.py @@ -6,7 +6,6 @@ import pymunk 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 @@ -87,10 +86,10 @@ class Shrub(BaseObstacle): 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] -- 2.34.1