Beispiel #1
0
def main():
    state_dict = {
        "main_menu": main_menu.MainMenu(),
        "load_sreen": load_screen.LoadScreen(),
        "level": level.Level()
    }
    game = tools.Game(state_dict, "main_menu")
    game.run(state)
Beispiel #2
0
def main():
    state_dict = {
        'main_menu': main_menu.MainMenu(),
        'load_screen': load_screen.LoadScreen(),
        'level': level.Level()
    }
    game = tools.Game(state_dict, 'main_menu')
    game.run()
Beispiel #3
0
def main():

    states = {
        'main_menu': main_menu.MainMenu(),
        'load_screen': load_screen.LoadScreen(),
        'level': level.Level(),
        'game_over': load_screen.GameOver()
    }
    game = tools.Game(states, 'main_menu')
    game.run()
Beispiel #4
0
def main():
    C.bathPath = resource_path('')
    state_dict = {
        'MainMenu': MainMenu.MainMenu(),
        'LoadScreen': LoadScreen.LoadScreen(),
        'SinglePlayer': SinglePlayer.SinglePlayer(),
        'GameOver': GameOver.GameOver(),
        'MultiPlayer': MultiPlayer.MultiPlayer(),
        'Auto': AI.AI(),
        'ManAI': ManAI.ManAI()
    }
    game = tools.Game(state_dict, 'MainMenu')
    game.run()
Beispiel #5
0
def main():
    game = tools.Game() # 初始主控流程
    # 初始各个游戏阶段
    state_dict = {C.MAIN_MENU: main_menu.Menu(),
                  C.LOAD_SCREEN: load_screen.LoadScreen(),
                  C.LEVEL: level.Level(),
                  C.GAME_OVER: load_screen.GameOver(),
                  C.TIME_OUT: load_screen.TimeOut()
                  }
    # 启动主菜单
    game.setup_states(state_dict, C.MAIN_MENU)

    # 执行主控流程里的主函数
    game.run()
Beispiel #6
0
def main():
    ends = end_stat.End_s()
    game = tools.Game()
    states_0 = main_menu.MainMenu()  # 主菜单
    states_1 = maps.MapCon()  # 地图控制
    p1 = player.PlayerCO('1')

    file = open(EN1_JSONPATH, 'r', encoding='UTF-8')
    data = json.load(file)
    en1s = sprite.Group()
    for i in data['enemy_01']:
        print(i)
        en1s.add(enemys.Enemys(i["X"], i["Y"], '1'))
    en2s = sprite.Group()
    for i in data['enemy_02']:
        print(i)
        en2s.add(enemys.Enemys(i["X"], i["Y"], '2'))
    en_boos = enemys.Enemys(int(data["boos"][0]["X"]),
                            int(data["boos"][0]["Y"]), "3")  # boos
    file.close()
    en_boom = enemys.Bomb()

    game.run(states_0, states_1, p1, en1s, en2s, en_boos, en_boom, ends)
Beispiel #7
0
def main():
    game = tools.Game()
    state = main_menu.MainMenu()
    game.run(state)
Beispiel #8
0
def main():
    game = tools.Game()
    game.run()