头图

程序运行截图
946584706eca3b64bdf1332b2bf7af04.png

fcaa11054ffff22f96077a1cb4901c52.png

使用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()

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


源码好又多
1 声望1 粉丝

源码分享