def probe_launched(self): self.explosion.stop() screen_flash_effect = ScreenFadeEffect(self.fg_layer, self.level.engine.camera.rect) screen_flash_effect.fade_time_ms = 3000 screen_flash_effect.stopped.connect( self.level.engine.show_end_scene) screen_flash_effect.start()
def draw(self, surface): if not self.fade_effect: from foreverend.effects import ScreenFadeEffect self.fade_effect = ScreenFadeEffect( None, pygame.Rect(0, 0, surface.get_width(), surface.get_height())) self.fade_effect.fade_from_alpha = 255 self.fade_effect.fade_to_alpha = 0 self.fade_effect.fade_time_ms = 3000 self.fade_effect.start() surface.fill((0, 0, 0)) surface.blit(self.earth, (surface.get_width() - self.earth.get_width(), 0)) surface.blit(self.probe, (150, 60)) surface.blit(self.fade_effect.sprite.image, (0, 0))
class ClosingCutscene(Cutscene): 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!'), ] def stop(self): super(ClosingCutscene, self).stop() unload_image('earth.jpg') unload_image('crashing_probe') def draw(self, surface): if not self.fade_effect: from foreverend.effects import ScreenFadeEffect self.fade_effect = ScreenFadeEffect( None, pygame.Rect(0, 0, surface.get_width(), surface.get_height())) self.fade_effect.fade_from_alpha = 255 self.fade_effect.fade_to_alpha = 0 self.fade_effect.fade_time_ms = 3000 self.fade_effect.start() surface.fill((0, 0, 0)) surface.blit(self.earth, (surface.get_width() - self.earth.get_width(), 0)) surface.blit(self.probe, (150, 60)) surface.blit(self.fade_effect.sprite.image, (0, 0))
class ClosingCutscene(Cutscene): 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!'), ] def stop(self): super(ClosingCutscene, self).stop() unload_image('earth.jpg') unload_image('crashing_probe') def draw(self, surface): if not self.fade_effect: from foreverend.effects import ScreenFadeEffect self.fade_effect = ScreenFadeEffect( None, pygame.Rect(0, 0, surface.get_width(), surface.get_height())) self.fade_effect.fade_from_alpha = 255 self.fade_effect.fade_to_alpha = 0 self.fade_effect.fade_time_ms = 3000 self.fade_effect.start() surface.fill((0, 0, 0)) surface.blit(self.earth, (surface.get_width() - self.earth.get_width(), 0)) surface.blit(self.probe, (150, 60)) surface.blit(self.fade_effect.sprite.image, (0, 0))