Ejemplo n.º 1
0
    def __init__(self, make, model, year):
        """初始化父类的属性"""
        #super().__init__(make, model, year)
        Car.__init__(self, make, model, year)

        """将实例用作属性"""
        self.battery = Battery()
    def __init__(self, type_of_car: str, model: str, name: str, **kwargs):
        """Constructor"""

        Car.__init__(self, type_of_car, model, name,
                     kwargs['amount_of_passengers'],
                     kwargs['amount_of_wheels'])
        Electricity.__init__(self, kwargs['voltage'], kwargs['amperage'])
 def __init__(self, name, color, year, charging_voltage, battery):
     Car.__init__(self, name, color, year)
     # super().__init__(self, name, color, year)
     # super(ElectricalCar, self).__init__(self, name, color, year)
     self.charging_voltage = charging_voltage
     self.battery = battery
     print('Khoi tao tai ElectricalCar')
Ejemplo n.º 4
0
 def __init__(self, fuel_used, handle, is_gear, ac, steering_wheel,
              seat_belt, audio_player, no_of_wheels, speed, weight, milage,
              colour):
     self.fuel_used = fuel_used
     Bike.__init__(self, handle, is_gear, no_of_wheels, speed, weight,
                   milage, colour)
     Car.__init__(self, ac, steering_wheel, seat_belt, audio_player,
                  no_of_wheels, speed, weight, milage, colour)
Ejemplo n.º 5
0
    def __init__(self, length, width, *groups):
        Car.__init__(self, length, width)
        pygame.sprite.Sprite.__init__(self, *groups)

        self.surface = pygame.Surface((self.length * 3, self.width * 3),
                                      pygame.SRCALPHA)
        self.shifts = (self.surface.get_width() / 2 - self.length / 2,
                       self.surface.get_height() / 2 - self.width / 2)

        self.wheel_image = pygame.Surface([self.length / 4, self.width / 12],
                                          pygame.SRCALPHA)
        self.wheel_image.fill(BLUE)

        self.render()
Ejemplo n.º 6
0
 def __init__(self, car_data):
     Car.__init__(self, car_data)  #super().__init__(slef)
     self.car_data = car_data
Ejemplo n.º 7
0
 def __init__(self, name):
     Car.__init__(self, name)
     print "SUV init called..."
Ejemplo n.º 8
0
 def __init__(self):
     Car.__init__(self)
Ejemplo n.º 9
0
 def __init__(self, name, color, year, charging_voltage):
     Car.__init__(self, name, color, year)
     self.charging_voltage = charging_voltage
Ejemplo n.º 10
0
 def __init__(self, line, speed, people_carried):
     self.line = line
     self.closest_stop = None
     self.waiting_to_turn = False
     self.just_stopped = False
     Car.__init__(self, 0, 0, 1, speed, people_carried)
Ejemplo n.º 11
0
 def __init__(self, license, driver, brand, model):
     Car.__init__(self, license, driver)
     self.brand = brand
     self.model = model
Ejemplo n.º 12
0
 def __init__(self):
     Car.__init__(self)
     RentedItemMixin.__init__(self)
Ejemplo n.º 13
0
 def __init__(self, name):
     Car.__init__(self, name)
     self.twingo_model = None
Ejemplo n.º 14
0
 def __init__(self, brand, model, price, doors, voltage):
     Car.__init__(self, brand, model, price, doors)
     self.voltage = voltage
Ejemplo n.º 15
0
 def __init__(self, yr=2016):
     Car.__init__(self, "Honda", "Civic")
     self.year = yr
Ejemplo n.º 16
0
 def __init__(self, line, speed, people_carried):
     self.line = line
     self.closest_stop = None
     self.waiting_to_turn = False
     self.just_stopped = False
     Car.__init__(self, 0, 0, 1, speed, people_carried)
Ejemplo n.º 17
0
 def __init__(self, make, model, year):
     """ Init parent """
     Car.__init__(self, make, model, year)
Ejemplo n.º 18
0
 def __init__(self, license, driver, typeCarAccepted, seatsMaterial):
     Car.__init__(self, license, driver)
     self.typeCarAccepted = typeCarAccepted
     self.seatsMaterial = seatsMaterial
Ejemplo n.º 19
0
 def __init__(self, x, y, world):
     Car.__init__(self, x, y)
     self.sensorModel = SensorModel()
     self.numParticles = 500
     self.particles = self.generateNParticles(self.numParticles, world)
Ejemplo n.º 20
0
 def __init__(self, make_in, model_in, year_in, riders_in, doors_in):
     Bus.__init__(self, make_in, model_in, year_in, riders_in)
     Car.__init__(self, make_in, model_in, year_in, doors_in)
     self.meter = 5.0