Esempio n. 1
0
    def __init__(self, consumable=None):
        """
            Create multi rotate object lander
        """
        ship = conf.IMGS_LANDER
        self.ship_first_image = conf.IMGS_LANDER[0]
        ''' load consumable if found '''
        if consumable is not None:
            _ship = self.load_ship(consumable)
            if _ship is not None:
                ship = _ship
                self.ship_first_image = ship[0] 
                
        MultiRotated.__init__(self, filenames=ship,
                                steps=60,
                                colorkey=TRANSPARENT)

        self.path.set_restriction(speed=400)
        self.reset()
        self.fuel = ShipFuel()
        self.uprightImage = self.image
        
        self._flip_ticks = 0
        min_size = min(self.crect.h, self.crect.w)
        self.crect.h = min_size
        self.crect.w = min_size
        self.crect.inflate_ip(-4, -4)
Esempio n. 2
0
 def move(self):
     """
         Move lander and cosume fuel 
     """
     ticks = conf.ticks
     if not self.landed:
         self.turn()
         self.accelerate(ticks)
         MultiRotated.move(self)
     self.fuel.burn(ticks / 30.0)
Esempio n. 3
0
 def moving_on_path(self):
     self.stop_engine()
     self.flap_right_stop()
     self.flap_left_stop()
     MultiRotated.unpause(self)