def draw(self, graphics): v = Vector2(self.x, self.y, 0) w = Vector2.fromAngle(self.angle - math.pi / 2, 1) w.setMag(15 + (20 if self.force > 0 else 0)) p1 = Vector2.subv(v, w) w.setMag(100) p2 = Vector2.subv(v, w) graphics.line(p1.x, p1.y, p2.x, p2.y, 8, (150, 75, 0))
def get_force(self): w = Vector2.fromAngle(self.angle - math.pi / 2, 1) w.setMag(self.initialForce * 10) return w