Ejemplo n.º 1
0
def game_main_panel() -> int:
    """
    游戏标题界面主面板
    """
    era_print.restart_line_print()
    era_print.line_feed_print(
        text_handle.align(game_config.game_name, "center")
    )
    era_print.line_feed_print(text_handle.align(game_config.author, "right"))
    era_print.line_feed_print(text_handle.align(game_config.verson, "right"))
    era_print.line_feed_print(
        text_handle.align(game_config.verson_time, "right")
    )
    era_print.line_feed_print()
    era_print.restart_line_print()
    era_print.lines_center_print(
        1 / 3, text_loading.get_text_data(constant.FilePath.MESSAGE_PATH, "2")
    )
    time.sleep(1)
    era_print.line_feed_print()
    era_print.restart_line_print()
    time.sleep(1)
    py_cmd.focus_cmd()
    menu_int = cmd_button_queue.option_int(constant.CmdMenu.LOGO_MENU)
    return menu_int
Ejemplo n.º 2
0
def start_frame():
    """
    游戏主流程
    """
    while True:
        py_cmd.clr_cmd()
        py_cmd.focus_cmd()
        constant.panel_data[cache.now_panel_id]()
Ejemplo n.º 3
0
def mouse_check_push():
    """
    更正鼠标点击状态数据映射
    """
    py_cmd.focus_cmd()
    if not cache_contorl.wframe_mouse.mouse_leave_cmd == 0:
        main_frame.send_input()
        cache_contorl.wframe_mouse.mouse_leave_cmd = 1
Ejemplo n.º 4
0
def game_update_flow(add_time: int):
    """
    游戏流程刷新
    Keyword arguments:
    add_time -- 游戏步进的时间
    """
    character_behavior.init_character_behavior()
    game_time.sub_time_now(add_time)
    character_behavior.init_character_behavior()
    py_cmd.focus_cmd()
Ejemplo n.º 5
0
def mouse_left_check(event: Event):
    """
    鼠标左键事件处理
    Keyword arguments:
    event -- 鼠标事件
    """
    py_cmd.focus_cmd()
    if not cache.wframe_mouse.w_frame_up:
        set_wframe_up()
    else:
        mouse_check_push()