del p self.ticks += 1 if self.ticks >= (get_fps() * 31) + 9: self.fade_ticks += 1 def draw(self, surface): surface.blit(self.image, self.rect) if __name__ == "__main__": import sys, platform, colorsys logging.getLogger().setLevel(logging.INFO) logging.basicConfig() args = Renderer.cmd_line_args() LN2015 = Renderer.Player('plasma', MADRIX_X, MADRIX_Y, fps=24, args=args) LN2015.load_sprite("Plasma", 50, Plasma((65, 51))) alive = True while alive: alive = LN2015.run() if 'windows' in platform.platform().lower(): ffmpeg_exe = 'C:\\Users\\admin\\Desktop\\ffmpeg-20150921-git-74e4948-win64-static\\bin\\ffmpeg.exe' else: ffmpeg_exe = 'ffmpeg' LN2015.export_video(ffmpeg_exe, '00:00:42.9') LN2015.end() sys.exit()
'{}x{}'.format(lamp.x, lamp.y), False, (255, 0, 0), ), (2, 5)) self.ticks += 1 if __name__ == "__main__": logging.getLogger().setLevel(logging.INFO) logging.basicConfig() args = Renderer.cmd_line_args() LN2015 = Renderer.Player('lamps', MADRIX_X, MADRIX_Y, fps=24, args=args) LN2015.load_sprite("Lamps", 50, Lamps()) alive = True while alive: alive = LN2015.run() if 'windows' in platform.platform().lower(): ffmpeg_exe = 'C:\\Users\\admin\\Desktop\\ffmpeg-20150921-git-74e4948-win64-static\\bin\\ffmpeg.exe' else: ffmpeg_exe = 'ffmpeg' LN2015.export_video(ffmpeg_exe) LN2015.end() sys.exit()
if self.alpha < 0.0: raise StopIteration self.image.set_alpha(255 * self.alpha) def draw(self, surface): surface.blit(self.image, self.rect) if __name__ == "__main__": import sys, platform, colorsys logging.getLogger().setLevel(logging.INFO) logging.basicConfig() args = Renderer.cmd_line_args() LN2015 = Renderer.Player('objects', MADRIX_X, MADRIX_Y, fps=24, args=args) LN2015.load_sprite("Sun", 50, RisingSun((66, 51), (66, 51), 50, 24 * 50, 24 * 30)) alive = True while alive: alive = LN2015.run() if 'windows' in platform.platform().lower(): ffmpeg_exe = 'C:\\Users\\admin\\Desktop\\ffmpeg-20150921-git-74e4948-win64-static\\bin\\ffmpeg.exe' else: ffmpeg_exe = 'ffmpeg' LN2015.export_video(MADRIX_X, MADRIX_Y, ffmpeg_exe) LN2015.end()