コード例 #1
0
    def __init__(self):
        super(OpeningCutscene, self).__init__()
        self.earth = load_image('earth.jpg')
        self.time_fractures = load_image('earth_time_fractures')

        self.pages = [
            TextPage(
                4000, 'The Mayans predicted that 2012 would mark a '
                'new era, forever changing us all.'),
            TextPage(
                4000, 'History is filled with such predictions. '
                'Most are dismissed as nonsense.'),
            TextPage(4000, 'If only we paid attention...'),
            TextPage(
                5000, 'In December 2012, an object crashed down to Earth in a '
                'brilliant flash of light.'),
            TextPage(
                5000, 'It came out of nowhere, so it seemed, but we did '
                'have warning.\nAfterall, history has recorded this very '
                'crash, time and time again...'),
            TextPage(
                5000, 'We know very little about what it is that hit the '
                'Earth,\n'
                'but we do know it shattered time, blending '
                'pieces of history together.'),
            TextPage(3000,
                     'Scientists refer to the crash as the Omega 13 event.'),
            TextPage(
                4000, 'The object is now believed to exist in fragments, '
                'scattered throughout history.'),
            TextPage(
                4000, 'No human can safely reach them, or repair the holes '
                'in time.'),
            TextPage(4000, 'But a probe...'),
        ]
コード例 #2
0
ファイル: ui.py プロジェクト: chipx86/foreverend
    def __init__(self, *args, **kwargs):
        super(ControlPanel, self).__init__(*args, **kwargs)
        self._level = None
        self.resize(self.ui_manager.size[0], 40)
        self.surface = pygame.Surface(self.rect.size)
        self.heart_image = load_image("heart")
        self.heart_lost_image = load_image("heart_lost")
        self.life_image = load_image("life")
        self.life_lost_image = load_image("life_lost")

        player = self.ui_manager.engine.player
        player.lives_changed.connect(self.render)
        player.health_changed.connect(self.render)

        self.area_changed_cnx = None
コード例 #3
0
ファイル: ui.py プロジェクト: chipx86/foreverend
    def __init__(self, *args, **kwargs):
        super(ControlPanel, self).__init__(*args, **kwargs)
        self._level = None
        self.resize(self.ui_manager.size[0], 40)
        self.surface = pygame.Surface(self.rect.size)
        self.heart_image = load_image('heart')
        self.heart_lost_image = load_image('heart_lost')
        self.life_image = load_image('life')
        self.life_lost_image = load_image('life_lost')

        player = self.ui_manager.engine.player
        player.lives_changed.connect(self.render)
        player.health_changed.connect(self.render)

        self.area_changed_cnx = None
コード例 #4
0
ファイル: cutscenes.py プロジェクト: chipx86/foreverend
    def __init__(self):
        super(ClosingCutscene, self).__init__()
        self.earth = load_image('earth.jpg')
        self.probe = load_image('crashing_probe')
        self.fade_effect = None
        self.allow_escape = False

        self.pages = [
            DelayPage(3000),
            TextPage(3000, 'Irony.'),
            TextPage(5000, 'We sought to prevent the greatest tragedy in '
                           'history, and believed we were capable.'),
            TextPage(5000, 'Yet, with all our arrogance and '
                           'short-sightedness,\n'
                           'our very creation was the '
                           'cause of our downfall.'),
            TextPage(5000, 'We thought we could fix the planet. Fix time.'),
            TextPage(5000, 'Now we are all sons of bitches.'),
            TextPage(2000, 'Development and artwork by Christian Hammond.\n'
                           'Thanks for playing!'),
        ]
コード例 #5
0
ファイル: cutscenes.py プロジェクト: chipx86/foreverend
    def __init__(self):
        super(OpeningCutscene, self).__init__()
        self.earth = load_image('earth.jpg')
        self.time_fractures = load_image('earth_time_fractures')

        self.pages = [
            TextPage(4000,
                     'The Mayans predicted that 2012 would mark a '
                     'new era, forever changing us all.'),
            TextPage(4000,
                     'History is filled with such predictions. '
                     'Most are dismissed as nonsense.'),
            TextPage(4000,
                     'If only we paid attention...'),
            TextPage(5000,
                     'In December 2012, an object crashed down to Earth in a '
                     'brilliant flash of light.'),
            TextPage(5000,
                     'It came out of nowhere, so it seemed, but we did '
                     'have warning.\nAfterall, history has recorded this very '
                     'crash, time and time again...'),
            TextPage(5000,
                     'We know very little about what it is that hit the '
                     'Earth,\n'
                     'but we do know it shattered time, blending '
                     'pieces of history together.'),
            TextPage(3000,
                     'Scientists refer to the crash as the Omega 13 event.'),
            TextPage(4000,
                     'The object is now believed to exist in fragments, '
                     'scattered throughout history.'),
            TextPage(4000,
                     'No human can safely reach them, or repair the holes '
                     'in time.'),
            TextPage(4000,
                     'But a probe...'),
        ]
コード例 #6
0
    def __init__(self):
        super(ClosingCutscene, self).__init__()
        self.earth = load_image('earth.jpg')
        self.probe = load_image('crashing_probe')
        self.fade_effect = None
        self.allow_escape = False

        self.pages = [
            DelayPage(3000),
            TextPage(3000, 'Irony.'),
            TextPage(
                5000, 'We sought to prevent the greatest tragedy in '
                'history, and believed we were capable.'),
            TextPage(
                5000, 'Yet, with all our arrogance and '
                'short-sightedness,\n'
                'our very creation was the '
                'cause of our downfall.'),
            TextPage(5000, 'We thought we could fix the planet. Fix time.'),
            TextPage(5000, 'Now we are all sons of bitches.'),
            TextPage(
                2000, 'Development and artwork by Christian Hammond.\n'
                'Thanks for playing!'),
        ]
コード例 #7
0
ファイル: particles.py プロジェクト: chipx86/foreverend
    def start(self, x, y):
        assert self.pos is None
        self.pos = (x, y)

        self.particles = []

        for i in range(self.max_particles):
            self.particles.append(Particle(self))

        self.free_particles = list(self.particles)

        if not self.image:
            self.image = load_image(self.particle_filename).convert_alpha()

        self.add_particles()
        self.area.particle_systems.append(self)
        self.timer.start()
コード例 #8
0
    def start(self, x, y):
        assert self.pos is None
        self.pos = (x, y)

        self.particles = []

        for i in range(self.max_particles):
            self.particles.append(Particle(self))

        self.free_particles = list(self.particles)

        if not self.image:
            self.image = load_image(self.particle_filename).convert_alpha()

        self.add_particles()
        self.area.particle_systems.append(self)
        self.timer.start()
コード例 #9
0
ファイル: base.py プロジェクト: chipx86/foreverend
    def generate_image(self):
        if not self.name:
            # Must be a custom sprite.
            return self.image

        image = load_image(self.name)

        if (self.flip_image and
            (self._direction == Direction.LEFT or self.reverse_gravity)):
            flip_h = (self.direction == Direction.LEFT)
            flip_v = self.reverse_gravity

            key = (self.name, flip_h, flip_v)

            if key not in self._flipped_images:
                self._flipped_images[key] = \
                    pygame.transform.flip(image, flip_h, flip_v)

            image = self._flipped_images[key]

        return image
コード例 #10
0
ファイル: base.py プロジェクト: chipx86/foreverend
    def generate_image(self):
        if not self.name:
            # Must be a custom sprite.
            return self.image

        image = load_image(self.name)

        if (self.flip_image and
            (self._direction == Direction.LEFT or self.reverse_gravity)):
            flip_h = (self.direction == Direction.LEFT)
            flip_v = self.reverse_gravity

            key = (self.name, flip_h, flip_v)

            if key not in self._flipped_images:
                self._flipped_images[key] = \
                    pygame.transform.flip(image, flip_h, flip_v)

            image = self._flipped_images[key]

        return image
コード例 #11
0
ファイル: level3.py プロジェクト: chipx86/foreverend
    def setup(self):
        level_width, level_height = self.size

        lava_name = '65000000bc/lava_pool'
        tiles_x = level_width / load_image(lava_name).get_width()
        lava = TiledSprite('65000000bc/lava_pool', tiles_x, 1)
        lava.lethal = True
        self.main_layer.add(lava)
        lava.move_to(0, level_height - lava.rect.height)

        cliff = Sprite('40000000ad/cliff_left')
        cliff.use_pixel_collisions = True
        self.main_layer.add(cliff)
        cliff.move_to(0, level_height - cliff.rect.height)

        self.main_layer.add(self.bluebox)
        self.bluebox.move_to(60, cliff.rect.top - self.bluebox.rect.height)
        self.bluebox.destination = self.time_period.areas['bluebox'].door

        cliff = Sprite('40000000ad/cliff_middle')
        cliff.use_pixel_collisions = True
        self.main_layer.add(cliff)
        cliff.move_to(1720, level_height - cliff.rect.height)
コード例 #12
0
ファイル: level3.py プロジェクト: chipx86/foreverend
 def draw_bg(self, surface):
     surface.fill((209, 186, 151))
     moon = load_image('40000000ad/moon')
     surface.blit(moon, (surface.get_width() - 150, 40))