Esempio n. 1
0
 def __init__(self,
              x,
              y,
              xdim=80,
              ydim=40,
              angle=0.0,
              vel=0.0,
              max_vel=5,
              mass=100.0,
              dynamics_model="kinematic",
              destination=None,
              trajectory=None):
     Rectangle.__init__(self,
                        x,
                        y,
                        xdim,
                        ydim,
                        angle,
                        mass=mass,
                        sprite="blue_car.png")
     l_f = l_r = self.ydim / 2.0
     DynamicShape.__init__(self, l_r, l_f, max_vel, dynamics_model)
     self.vel = vel
     self.max_vel = max_vel
     self.dynamics_model = dynamics_model
     self.destination = destination
     self.trajectory = trajectory
     self.l_f = self.l_r = self.ydim / 2.0
Esempio n. 2
0
 def __init__(self, x, y, xdim, ydim, angle=0.0):
     Rectangle.__init__(self,
                        x,
                        y,
                        xdim,
                        ydim,
                        angle=angle,
                        sprite="gray.png",
                        static=True)
Esempio n. 3
0
 def __init__(self, x, y, xdim, ydim):
     sprite = ["block1.png", "block2.png", "block3.png",
               "block4.png"][np.random.randint(0, 3)]
     Rectangle.__init__(self,
                        x,
                        y,
                        xdim,
                        ydim,
                        sprite="grass.jpg",
                        static=True)
 def __init__(self,
              x,
              y,
              angle=0,
              init_color="green",
              angle_deg=0,
              time_in_color=0):
     angle = np.deg2rad(angle_deg % 360) if angle_deg else angle
     Rectangle.__init__(self, x, y, 15, 25, angle)
     self.time_in_color = time_in_color
     self.color = init_color
Esempio n. 5
0
 def __init__(self, x, y, angle, initial_color="green"):
     Rectangle.__init__(self, x, y, 15, 15, angle)
     self.time_in_color = 0
     self.color = initial_color
Esempio n. 6
0
 def __init__(self, x, y, xdim, ydim):
     Rectangle.__init__(self, x, y, xdim, ydim, angle=0.0, sprite="black.png", static=True);
Esempio n. 7
0
 def __init__(self, x, y, angle=0, init_color="red", angle_deg=None, time_in_color=0):
     if (angle_deg is not None):
         angle = np.deg2rad(angle_deg)
     Rectangle.__init__(self, x, y, 15, 15, angle)
     self.time_in_color = time_in_color
     self.color = init_color