示例#1
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()
示例#2
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)
示例#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()
示例#4
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)