Ejemplo n.º 1
0
 def __init__(self):
     super().__init__()
     self.add_component('renderer', Renderer())
     self.add_component(
         'physics',
         Physics(CIRCLE_MASS, CIRCLE_S_FRICTION, CIRCLE_K_FRICTION,
                 Vector2D(0, 0)))
     self.add_component('body', Body.Circle(0, Vector2D(300, 300), 50, 30))
     self.add_component('controller', Controller.CircleController())
Ejemplo n.º 2
0
 def __init__(self):
     super().__init__()
     self.add_component('body', Body.Circle(0, (0, 0), 0, 3, False))
     self.add_component('renderer', Renderer())
Ejemplo n.º 3
0
 def __init__(self, position, velocity):
     super().__init__()
     self.add_component('physics', Physics(BULLET_MASS, BULLET_FRICTION, BULLET_FRICTION, velocity))
     self.add_component('renderer', Renderer())
     self.add_component('body', Body.Circle(0, position, 1, 4))