关于python:源码好又多Python超级马里奥源代码

14次阅读

共计 586 个字符,预计需要花费 2 分钟才能阅读完成。

程序运行截图

应用 Python 实现的超级马里奥源程序,程序行入口 marrio_level_1.py,本程序可实现单人或双人游戏。运行程序请需装置 pygame,data 为程序相干文件,其中 components 为程序中各种组件,resources 为资源文件(含字体、声音、图形等)

main.py


__author__ = '源码好又多'

from . import setup,tools
from .states import main_menu,load_screen,level1
from . import constants as c


def main():
    """Add states to control here."""
    run_it = tools.Control(setup.ORIGINAL_CAPTION)
    state_dict = {c.MAIN_MENU: main_menu.Menu(),
                  c.LOAD_SCREEN: load_screen.LoadScreen(),
                  c.TIME_OUT: load_screen.TimeOut(),
                  c.GAME_OVER: load_screen.GameOver(),
                  c.LEVEL1: level1.Level1()}

    run_it.setup_states(state_dict, c.MAIN_MENU)
    run_it.main()

源码地址:微信公众号【源码好又多】回复 马里奥

正文完
 0