예제 #1
0
    def absorb_artifact(self):
        player = self.level.engine.player
        player.direction = Direction.LEFT

        self.level.artifact.collidable = False

        move_effect = MoveEffect(self.level.artifact)
        move_effect.collidable = False
        move_effect.total_time_ms = 1500
        move_effect.timer_ms = 30
        move_effect.destination = player.rect.center
        move_effect.start()

        screen_flash_effect = ScreenFlashEffect(self.fg_layer,
                                                self.level.engine.camera.rect)
        screen_flash_effect.flash_peaked.connect(self.grow_probe)
        screen_flash_effect.stopped.connect(self.prepare_launch)
        screen_flash_effect.start()
예제 #2
0
    def start_end_sequence(self, *args, **kwargs):
        if self.in_end_sequence:
            return

        self.in_end_sequence = True
        player = self.level.engine.player
        player.stop_tractor_beam()
        player.block_events = True
        player.velocity = (0, 0)
        player.fall()

        move_effect = MoveEffect(self.level.triangle_key)
        move_effect.total_time_ms = 1500
        move_effect.timer_ms = 30
        move_effect.destination = self.keyhole.rect.topleft
        move_effect.stopped.connect(self.on_key_inserted)
        move_effect.start()