public void message(s_message message) { if (message.m_type == "edit_delete_map") { protocol.game.cmsg_delete_map msg = new protocol.game.cmsg_delete_map(); msg.id = m_ed[m_index].id; net_http._instance.send_msg <protocol.game.cmsg_delete_map>(opclient_t.OPCODE_DELETE_MAP, msg); } if (message.m_type == "edit_upload_map") { m_player_type = 2; protocol.game.cmsg_play_edit_map msg = new protocol.game.cmsg_play_edit_map(); msg.id = m_ed[m_index].id; net_http._instance.send_msg <protocol.game.cmsg_play_edit_map>(opclient_t.OPCODE_PLAY_EDIT_MAP, msg); } if (message.m_type == "jx_6") { mario._instance.change_state(e_game_state.egs_play_select, 1, delegate() { Object.Destroy(this.gameObject); }); } }
void click(GameObject obj) { if (obj.name == "close") { mario._instance.change_state(e_game_state.egs_login, 1, delegate() { Object.Destroy(this.gameObject); }); } if (obj.name == "close_info") { m_info.GetComponent <ui_show_anim>().hide_ui(); } if (obj.name == "edit") { if (m_ed[m_index].upload == 1) { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_wfxg")); return; } m_player_type = 0; protocol.game.cmsg_play_edit_map msg = new protocol.game.cmsg_play_edit_map(); msg.id = m_ed[m_index].id; net_http._instance.send_msg <protocol.game.cmsg_play_edit_map>(opclient_t.OPCODE_PLAY_EDIT_MAP, msg); } if (obj.name == "play") { m_player_type = 1; protocol.game.cmsg_play_edit_map msg = new protocol.game.cmsg_play_edit_map(); msg.id = m_ed[m_index].id; net_http._instance.send_msg <protocol.game.cmsg_play_edit_map>(opclient_t.OPCODE_PLAY_EDIT_MAP, msg); } if (obj.name == "upload") { if (mario._instance.m_self.visitor == 1) { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_ykwf")); return; } if (m_ed[m_index].upload == 1) { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_wfsc")); return; } if (m_ed[m_index].url.Length == 0) { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_wfwbj")); return; } if (m_ed[m_index].name == "empty") { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_xgmz")); return; } s_message mes = new s_message(); mes.m_type = "edit_upload_map"; mario._instance.show_double_dialog_box(game_data._instance.get_language_string("edit_select_gui_tgsc"), mes); } if (obj.name == "delete") { s_message mes = new s_message(); mes.m_type = "edit_delete_map"; mario._instance.show_double_dialog_box(game_data._instance.get_language_string("edit_select_gui_sfsc"), mes); } if (obj.name == "cn") { if (m_ed[m_index].upload == 1) { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_wfxg")); return; } m_cn_text.GetComponent <UIInput>().value = m_ed[m_index].name; m_cn.SetActive(true); } if (obj.name == "cnok") { string name = m_cn_text.GetComponent <UIInput>().value; if (name == "") { mario._instance.show_tip(game_data._instance.get_language_string("edit_select_gui_mzbk")); return; } m_cname = name; protocol.game.cmsg_change_map_name msg = new protocol.game.cmsg_change_map_name(); msg.id = m_ed[m_index].id; msg.name = name; net_http._instance.send_msg <protocol.game.cmsg_change_map_name>(opclient_t.OPCODE_CHANGE_MAP_NAME, msg); } if (obj.name == "close_cn") { m_cn.GetComponent <ui_show_anim>().hide_ui(); } if (obj.name == "tip") { m_tip.SetActive(true); } if (obj.name == "close_tip") { m_tip.GetComponent <ui_show_anim>().hide_ui(); } }