bool toServer(RoomInfo room) { if (room == null) { PanelInformer.instance.Add(INC.la("no_changed_room_plc"), PanelInformer.LOG_TYPE.INFORMAION); return(false); } if (room.Password != string.Empty && room.Password == password) { AddFilter(Filter); PhotonNetwork.JoinRoom(room.name); conected = true; FengGameManagerMKII.instance.saves(); string strw = string.Empty; return(true); } else if (room.Password != string.Empty && room.Password != password) { PanelInformer.instance.Add(INC.la("pass_no_correct_plc"), PanelInformer.LOG_TYPE.WARNING); return(false); } else if (room.Password == string.Empty) { AddFilter(Filter); conected = true; PhotonNetwork.JoinRoom(room.name); FengGameManagerMKII.instance.saves(); } return(false); }
public static void kick(PhotonPlayer player) { if (player != null) { if (player == PhotonNetwork.player) { FengGameManagerMKII.instance.chatRoom.addLINE(INC.la("error_you_no_kiked")); } else if (!FengGameManagerMKII.OnPrivateServer && !PhotonNetwork.isMasterClient) { object[] parameters4 = new object[] { "/kick #" + Convert.ToString(player.ID), LoginFengKAI.player.name }; FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, parameters4); } else { if (FengGameManagerMKII.OnPrivateServer) { FengGameManagerMKII.instance.kickPlayerRC(player, false, ""); } else if (PhotonNetwork.isMasterClient) { FengGameManagerMKII.instance.kickPlayerRC(player, false, ""); cext.mess(player.name() + INC.la("kicked_from_the_serv")); } } } else { FengGameManagerMKII.instance.chatRoom.addLINE(INC.la("player_not_fond")); } }
void Start() { searshing = (((string)FengGameManagerMKII.settings[265]).Split(new char[] { ',' })).EmptyD(); ShowSet = new bool[] { false, false, false, false, false, false }; setting = new int[] { 0, 0, 0, 0, 0, 0 }; RoomList = new List <RoomInfo>(); PanelInformer.instance.Add(INC.la("chage_serv_plc"), PanelInformer.LOG_TYPE.INFORMAION); password = string.Empty; myRoom = new MyRoom(); timerupdatelist = 3f; Filter = string.Empty; posPanel = base.gameObject.transform.localPosition; if ((int)FengGameManagerMKII.settings[267] == 1) { ShowPanel(); } else { HidePanel(); } CyanPanelRect = new Rect(Screen.width / 2 - 440, Screen.height / 2 - 250, 880, 500); if (UIMainReferences.instance != null || NGUITools.GetActive(UIMainReferences.instance.panelMain)) { NGUITools.SetActive(UIMainReferences.instance.panelMain, false); } }
private void Init() { this.ModField = new INC("Mod", lnType, iedType); this.BehField = new INS("Beh", lnType, iedType); this.HealthField = new INS("Health", lnType, iedType); this.NamPltField = new LPL("NamPlt", lnType, iedType); }
public BaseFragment(ISellerOrderService sellerOrderService, ISellerAuthService authService) { this._sellerOrderService = sellerOrderService; this._authService = authService; this.TextStatusSeller = new NC <string>(_sellerOrderService.CurentStatus); InitFragment(); }
public IErrorInfo Validate(string fieldName, INC <string> value, object subject) { if (!_predicate(value)) { var fieldTitle = System.Text.RegularExpressions.Regex.Replace(fieldName, "(?<=.)([A-Z])", " $0", System.Text.RegularExpressions.RegexOptions.None); return(new ErrorInfo(fieldName, _message == null ? string.Format("The Length of {0} must between {1} and {2}", fieldTitle, _minimumLength, _maximumLength) : string.Format(_message, fieldTitle, _minimumLength, _maximumLength))); } return(null); }
public void KickedConference(int ID_room, int ID_player, PhotonMessageInfo info) { cnf con = Find(ID_room); if (con != null && con.master == info.sender) { con.players_ID.Remove(ID_player); con.messages.Add(INC.la("kicked_confer") + PhotonPlayer.Find(ID_player).iscleanname); } }
void botom_right() { Rect rr = new Rect(0, Screen.height - 22, 180f, 22); Rect[] rect = new Rect[] { rr, rr, rr, rr }; string vk = "ВКонтакте"; for (int s = 0; s < rect.Length; s++) { GUIStyle style = new GUIStyle(GUI.skin.box); style.fontSize = 15; style.alignment = TextAnchor.MiddleLeft; style.normal.background = GUI.skin.box.onNormal.background; rect[s].y = rect[s].y - (22 * s); if (rect[s].Contains(Event.current.mousePosition)) { style.normal = GUI.skin.box.normal; rect[s].x = rect[s].x + 20f; if (s == 0) { vk = "https://vk.com/cyan_mod"; } } if (s == 0) { if (GUI.Button(rect[s], vk, style)) { Process.Start("https://vk.com/cyan_mod"); } } else if (s == 1) { if (GUI.Button(rect[s], CyanMod.INC.la("Snapshot_Reviewer"), style)) { Application.LoadLevel("SnapShot"); } } else if (s == 2) { if (GUI.Button(rect[s], CyanMod.INC.la("Custom_Characters"), style)) { Application.LoadLevel("characterCreation"); } } else if (s == 3) { if (GUI.Button(rect[s], INC.la("Level_Editor"), style)) { FengGameManagerMKII.settings[64] = 101; Application.LoadLevel(2); } } } }
public IErrorInfo Validate(string fieldName, INC <decimal> value, object subject) { if (!_predicate(value)) { return(new ErrorInfo(fieldName, _message == null ? string.Format("The Range of {0} must between {1} and {2}", fieldName, _minimum, _maximum) : string.Format(_message, fieldName, _minimum, _maximum) )); } return(null); }
public void to_wait(RoomInfo info) { id_server = info.IDRoom; name_server = info.RoomName; map_server = info.MapName; diff_server = info.Difficulty; day_server = info.DayTime; password = info.Password; info_s = INC.la("waiting_server") + name_server.toHex().Resize(15) + "..."; StartCoroutine(waitlvl()); }
public void showTxt() { this.label_name.GetComponent <UILabel>().text = INC.la("server_name"); this.label_refresh.GetComponent <UILabel>().text = INC.la("btn_refresh"); this.label_back.GetComponent <UILabel>().text = INC.la("btn_back"); this.label_create.GetComponent <UILabel>().text = INC.la("btn_create_game"); UILabel[] gm = base.gameObject.GetComponentsInChildren <UILabel>(); foreach (UILabel lab in gm) { lab.color = INC.color_UI; } }
public static void execute(CPU cpu, MEM memory) { switch (memory.getMem(cpu.PC)) { case 0xE6: case 0xEE: INC.INC_ZP(cpu, memory); return; case 0xF6: case 0xFE: return; } }
public void newSettin(float labelwidth) { GUICyan.OnToogleCyan(INC.la("show_connection"), 384, 1, 0, labelwidth); try { if ((int)FengGameManagerMKII.settings[384] == 1) { PhotonNetwork.networkingPeer.TrafficStatsEnabled = true; } else { PhotonNetwork.networkingPeer.TrafficStatsEnabled = false; } } catch {}; }
void OnGUI() { GUI.depth = -120; GUI.backgroundColor = INC.gui_color; GUILayout.BeginArea(new Rect(Screen.width / 2 - 120, Screen.height / 2 - 50, 240, 100), GUI.skin.box); scrollPos = GUILayout.BeginScrollView(scrollPos); GUILayout.Label(info_s, new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter }); GUILayout.EndScrollView(); if (GUILayout.Button(INC.la("wait_server_stop"), GUILayout.Width(100f))) { Destroy(base.gameObject); } GUILayout.EndArea(); }
public void ExitConference(int ID, PhotonMessageInfo info) { cnf c = Find(ID); PhotonPlayer player = info.sender; if (c != null && c.players_ID.Contains(player.ID)) { if (player == PhotonNetwork.player) { conference_list.Remove(c); } else { c.players_ID.Remove(player.ID); c.messages.Add(INC.la("out_conference") + player.iscleanname); } } }
public void AddConference(int ID_room, int ID_player, int[] ids, string name, PhotonMessageInfo info) { if (ID_player == PhotonNetwork.player.ID) { cnf c = new cnf(ID_room, name, info.sender, ids); conference_list.Add(c); c.messages.Add("~~~~Commands~~~~\n/exit - out Conference.\n~~~~~~~~~~~~~"); InRoomChat.instance.addLINE(INC.la("you_aded_to_conf") + name); } else { cnf con = Find(ID_room); if (con != null && con.master == info.sender) { con.players_ID.Add(ID_player); con.messages.Add(INC.la("added_new_player") + PhotonPlayer.Find(ID_player).iscleanname); } } }
public void showTxt() { this.label_START.GetComponent <UILabel>().text = INC.la("btn_start"); this.label_BACK.GetComponent <UILabel>().text = INC.la("btn_back"); this.label_choose_map.GetComponent <UILabel>().text = INC.la("choose_map"); this.label_server_name.GetComponent <UILabel>().text = INC.la("server_name"); this.label_max_player.GetComponent <UILabel>().text = INC.la("max_player"); this.label_max_time.GetComponent <UILabel>().text = INC.la("max_Time"); this.label_game_time.GetComponent <UILabel>().text = INC.la("game_time"); this.label_difficulty.GetComponent <UILabel>().text = INC.la("difficulty"); this.label_normal.GetComponent <UILabel>().text = INC.la("ui_normal"); this.label_hard.GetComponent <UILabel>().text = INC.la("ui_hard"); this.label_ab.GetComponent <UILabel>().text = INC.la("ui_abnormal"); UILabel[] gm = base.gameObject.GetComponentsInChildren <UILabel>(); foreach (UILabel lab in gm) { lab.color = INC.color_UI; } }
public void showTxt() { this.label_START.GetComponent <UILabel>().text = INC.la("btn_start"); this.label_BACK.GetComponent <UILabel>().text = INC.la("btn_back"); this.label_camera.GetComponent <UILabel>().text = INC.la("camera_type"); this.label_original.GetComponent <UILabel>().text = INC.la("camera_original"); this.label_wow.GetComponent <UILabel>().text = INC.la("camera_wow"); this.label_tps.GetComponent <UILabel>().text = INC.la("camera_tps"); this.label_choose_character.GetComponent <UILabel>().text = INC.la("choose_character"); this.label_difficulty.GetComponent <UILabel>().text = INC.la("difficulty"); this.label_choose_map.GetComponent <UILabel>().text = INC.la("choose_map"); this.label_normal.GetComponent <UILabel>().text = INC.la("ui_normal"); this.label_hard.GetComponent <UILabel>().text = INC.la("ui_hard"); this.label_ab.GetComponent <UILabel>().text = INC.la("ui_abnormal"); UILabel[] gm = base.gameObject.GetComponentsInChildren <UILabel>(); foreach (UILabel lab in gm) { lab.color = CyanMod.INC.color_UI; } }
public LoginViewModel(ISellerAuthService loginService , IOwnerAuthService ownerAuthService , IUserDialogs userArcDialogs) { this._loginService = loginService; this._ownerAuthService = ownerAuthService; this._userArcDialogs = userArcDialogs; this.Username.Value = "*****@*****.**"; this.Password.Value = "pp"; this.RoleList = new NC <List <string> >(new List <string>() { RolesEnum.Продавец.ToString() , RolesEnum.Управляющий.ToString() , "Выберете роль" }); CurrentRole.Changed += CurrentRole_Changed; }
public void Start() { lang = this; last_round = INC.la("last_round_hud"); entered_1 = INC.la("entered_1hud"); closed = INC.la("closed_hud"); open = INC.la("open_hud"); room = INC.la("room_hud"); camera_hud = INC.la("camera_hud"); human = INC.la("human_hud"); current_wave = INC.la("current_wave_hud"); titan_left = INC.la("titan_left_hud"); wating = INC.la("wating_hud"); race_start_in = INC.la("race_start_in_hud"); time = INC.la("time_hud"); total_dmg = INC.la("total_dmg_hud"); max_damage = INC.la("max_damage_hud"); kills = INC.la("kills_hud"); max_sped = INC.la("max_sped_hud"); current_speed = INC.la("current_speed_hud"); respawn_in = INC.la("respawn_in_hud"); round_end = INC.la("round_end_hud"); win = INC.la("win_hud"); team = INC.la("team_hud"); human_win = INC.la("human_win_in_hud"); survive_all_waves = INC.la("survive_all_waves_in_hud"); second = INC.la("second_in_hud"); game_rest_in = INC.la("game_rest_in_hud"); humanity_fail = INC.la("humanity_fail_hud"); to_rest = INC.la("to_rest_hud"); survive = INC.la("survive_hud"); wave = INC.la("wave_hud"); ping = INC.la("ping_hud"); offline_mode = INC.la("offline_mode_hud"); press = INC.la("press_hud"); next_player = INC.la("next_player_hud"); prev_player = INC.la("prev_player_hud"); to_spectator = INC.la("to_spectator_hud"); use_cannon = INC.la("to_use_cannon_hud"); }
public static void AssociateOpcodes() { instructions[0] = new NOP(); instructions[1] = new PRNT(); instructions[16] = new PUSH(); instructions[17] = new POP(); instructions[18] = new SAVE(); instructions[19] = new CPY(); instructions[20] = new RNDM(); instructions[21] = new EMPTY(); instructions[128] = new ADD(); instructions[129] = new SUB(); instructions[130] = new MUL(); instructions[131] = new DIV(); instructions[132] = new SUB2(); instructions[133] = new DIV2(); instructions[134] = new NEG(); instructions[135] = new ABS(); instructions[144] = new INC(); instructions[145] = new DEC(); instructions[64] = new JMP(); instructions[65] = new JGZ(); instructions[66] = new JLZ(); instructions[67] = new JEZ(); instructions[68] = new JNZ(); instructions[69] = new CALL(); instructions[70] = new RET(); instructions[71] = new LDLOC(); instructions[72] = new STLOC(); instructions[73] = new LDARG(); instructions[74] = new STARG(); instructions[0b10100100] = new CMP();
IEnumerator waitlvl() { RoomInfo[] info = PhotonNetwork.GetRoomList(); int count = 0; while (true) { if (count > 1000) { yield return(info_s = INC.la("wait_server_time_out")); yield return(new WaitForSeconds(2f)); Destroy(base.gameObject); } foreach (RoomInfo inf in info) { if (id_server == inf.IDRoom && name_server == inf.RoomName && map_server == inf.MapName && diff_server == inf.Difficulty && day_server == inf.DayTime && password == inf.Password) { if (inf.playerCount < inf.maxPlayers) { PhotonNetwork.JoinRoom(inf.name); yield return(info_s = INC.la("conected_to_server") + name_server.toHex().Resize(15) + "..."); yield return(new WaitForSeconds(2f)); Destroy(base.gameObject); } } } yield return(new WaitForSeconds(0.2f)); info = PhotonNetwork.GetRoomList(); yield return(info_s = INC.la("waiting_server") + name_server.toHex().Resize(15) + "..." + "\n" + (1000 - count)); count = count + 1; yield return(null); } }
public static void ban(PhotonPlayer player) { if (player != null) { if (player == PhotonNetwork.player) { FengGameManagerMKII.instance.chatRoom.addLINE(INC.la("error_you_no_kiked")); } else if (FengGameManagerMKII.OnPrivateServer) { FengGameManagerMKII.instance.kickPlayerRC(player, true, ""); } else if (PhotonNetwork.isMasterClient) { FengGameManagerMKII.instance.kickPlayerRC(player, true, ""); cext.mess(player.name() + player.id() + INC.la("has_banned")); } } else { FengGameManagerMKII.instance.chatRoom.addLINE(INC.la("player_not_fond")); } }
void OnGUI() { GUI.backgroundColor = INC.gui_color; if ((int)FengGameManagerMKII.settings[343] == 1) { if (GUI.Button(new Rect(5, 5, 140, 22), INC.la("to_defoult_panel_server_list"))) { base.gameObject.transform.localPosition = pos_gm; FengGameManagerMKII.settings[343] = 0; FengGameManagerMKII.instance.saves(); } panel_gui(); } else { if (GUI.Button(new Rect(5, 5, 140, 22), INC.la("to_cyan_panel_server_list"))) { base.gameObject.transform.localPosition = new Vector3(0, 9999, 0); FengGameManagerMKII.settings[343] = 1; FengGameManagerMKII.instance.saves(); } } }
IEnumerator ConnectedS() { int con = 0; while (true) { yield return(new WaitForSeconds(0.2f)); con = con + 1; if (NGUITools.GetActive(UIMainReferences.instance.panelMultiROOM)) { NGUITools.SetActive(base.gameObject, false); } if (con > 1000) { connecting = INC.la("error_connectings"); yield break; } if (is_Conecting != 1) { yield break; } } }
public void command(string line, cnf room) { PhotonPlayer isMaster = room.master; line = line.Trim(); if (!line.StartsWith("/")) { if (room.players_ID.Contains(PhotonNetwork.player.ID)) { object[] pam = new object[] { room.ID_conf, line }; foreach (PhotonPlayer player in PhotonNetwork.playerList) { if ((player.CM || PhotonNetwork.offlineMode) && room.players_ID.Contains(player.ID)) { base.photonView.RPC("ConfChat", player, pam); } } } else { room.messages.Add(INC.la("you_kicked_in_room")); } } else { if (line.StartsWith("/kick")) { PhotonPlayer player = PhotonPlayer.Find(Convert.ToInt32(line.Split(new char[] { ' ' })[1])); if (player == null) { room.messages.Add("ERROR: Player not found."); return; } else if (!player.CM) { room.messages.Add("ERROR: Only Cyan_mod user."); return; } else if (player == PhotonNetwork.player) { room.messages.Add("ERROR: This is You."); return; } else if (player != room.master) { room.messages.Add("ERROR: No Master."); return; } else { foreach (PhotonPlayer player2 in PhotonNetwork.playerList) { if ((player2.CM || PhotonNetwork.offlineMode) && room.players_ID.Contains(player2.ID)) { base.photonView.RPC("KickedConference", player2, new object[] { room.ID_conf, player.ID }); } } } } if (line.StartsWith("/add")) { PhotonPlayer player = PhotonPlayer.Find(Convert.ToInt32(line.Split(new char[] { ' ' })[1])); if (player == null) { room.messages.Add("ERROR: Player not found."); return; } else if (!player.CM) { room.messages.Add("ERROR: Only Cyan_mod user."); return; } else if (player == PhotonNetwork.player) { room.messages.Add("ERROR: This is You."); return; } else if (PhotonNetwork.player != room.master) { room.messages.Add("ERROR: No Master."); return; } else { if (!room.players_ID.Contains(player.ID)) { foreach (PhotonPlayer player2 in PhotonNetwork.playerList) { if ((player2.CM || PhotonNetwork.offlineMode)) { base.photonView.RPC("AddConference", player2, new object[] { room.ID_conf, player.ID, room.players_ID.ToArray(), room.name_conf }); } } } else { room.messages.Add("ERROR: Player Adedded."); return; } } } if (line.StartsWith("/dell")) { if (room.master == PhotonNetwork.player) { foreach (PhotonPlayer player2 in PhotonNetwork.playerList) { if ((player2.CM || PhotonNetwork.offlineMode) && room.players_ID.Contains(player2.ID)) { base.photonView.RPC("DeliteConference", player2, new object[] { room.ID_conf }); } } } } if (line.StartsWith("/exit")) { foreach (PhotonPlayer player2 in PhotonNetwork.playerList) { if ((player2.CM || PhotonNetwork.offlineMode) && room.players_ID.Contains(player2.ID)) { base.photonView.RPC("ExitConference", player2, new object[] { room.ID_conf }); } } } } }
void OnGUI() { GUI.backgroundColor = INC.gui_color; GUILayout.BeginArea(new Rect(0, 0, 300, Screen.height)); GUILayout.BeginVertical(GUI.skin.box); int ist = isTitan; isTitan = GUILayout.SelectionGrid(isTitan, new string[] { "HUMAN", id }, 2); if (ist != isTitan) { if (!LevelInfo.getInfo(FengGameManagerMKII.level).teamTitan) { isTitan = 0; } } if (isTitan == 0) { GUIStyle style = new GUIStyle(GUI.skin.button); foreach (var stats in HeroStat.stats) { if (stats.Key != "CUSTOM_DEFAULT") { if (stat != null) { if (stat.name == stats.Key) { style.normal = GUI.skin.button.active; } else { style.normal = GUI.skin.button.normal; } } if (GUILayout.Button(stats.Key, style)) { IN_GAME_MAIN_CAMERA.singleCharacter = stats.Key; if (((stats.Key != "Set 1") && (stats.Key != "Set 2")) && (stats.Key != "Set 3")) { stat = HeroStat.getInfo(stats.Key); } else { HeroCostume costume = CostumeConeveter.LocalDataToHeroCostume(stats.Key); if (costume == null) { stat = new HeroStat(); } else { stat = costume.stat; } } if (PanelEnterGame.instance != null) { PanelEnterGame.instance.to_InfoHero(stat); } stat.name = stats.Key; } } } if (stat != null) { GUILayout.Label(stat.name); GUILayout.BeginHorizontal(); GUILayout.Label("SPD:" + stat.SPD); GUILayout.Label("ACL:" + stat.ACL); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("BLA:" + stat.BLA); GUILayout.Label("GAS:" + stat.GAS); GUILayout.EndHorizontal(); } string[] cos = new string[] { "Cos 1", "Cos 2", "Cos 3" }; GUILayout.BeginHorizontal(); GUIStyle style3 = new GUIStyle(GUI.skin.button); for (int s = 0; s < cos.Length; s++) { string de = cos[s]; if (CheckBoxCostume.costumeSet - 1 == s) { style3.normal = GUI.skin.button.active; } else { style3.normal = GUI.skin.button.normal; } if (GUILayout.Button(de, style3)) { CheckBoxCostume.costumeSet = s + 1; } } GUILayout.EndHorizontal(); } GUILayout.Label(CyanMod.INC.la("camera_type")); IN_GAME_MAIN_CAMERA.cameraMode = (CAMERA_TYPE)GUILayout.SelectionGrid((int)IN_GAME_MAIN_CAMERA.cameraMode, CameraType, 4); if (GUILayout.Button(INC.la("lets_go"))) { if (isTitan == 0) { string selection = stat.name; NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[0], true); FengGameManagerMKII.instance.needChooseSide = false; if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_CAPTURE) { FengGameManagerMKII.instance.checkpoint = CyanMod.CachingsGM.Find("PVPchkPtH"); } if (!PhotonNetwork.isMasterClient && (FengGameManagerMKII.instance.roundTime > 60f)) { if (FengGameManagerMKII.instance.heroes.Count != 0) { FengGameManagerMKII.instance.NOTSpawnPlayer(selection); } else { FengGameManagerMKII.instance.NOTSpawnPlayer(selection); FengGameManagerMKII.instance.photonView.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } } else if (((IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.BOSS_FIGHT_CT) || (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.TROST)) || (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_CAPTURE)) { if (FengGameManagerMKII.instance.heroes.Count != 0) { FengGameManagerMKII.instance.NOTSpawnPlayer(selection); FengGameManagerMKII.instance.photonView.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } else { FengGameManagerMKII.instance.SpawnPlayer(selection, "playerRespawn"); } } else { FengGameManagerMKII.instance.SpawnPlayer(selection, "playerRespawn"); } NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[1], false); NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[2], false); instance.enabled = false; IN_GAME_MAIN_CAMERA.usingTitan = false; IN_GAME_MAIN_CAMERA.instance.setHUDposition(); PhotonNetwork.player.character = selection; } else { if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_AHSS) { id = "AHSS"; NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[0], true); FengGameManagerMKII.instance.needChooseSide = false; if (!PhotonNetwork.isMasterClient && (FengGameManagerMKII.instance.roundTime > 60f)) { FengGameManagerMKII.instance.NOTSpawnPlayer(id); FengGameManagerMKII.instance.photonView.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } else { FengGameManagerMKII.instance.SpawnPlayer(id, "playerRespawn2"); } NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[1], false); NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[2], false); instance.enabled = false; IN_GAME_MAIN_CAMERA.usingTitan = false; IN_GAME_MAIN_CAMERA.instance.setHUDposition(); PhotonNetwork.player.character = id; } else { if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_CAPTURE) { FengGameManagerMKII.instance.checkpoint = CyanMod.CachingsGM.Find("PVPchkPtT"); } string selection = "RANDOM"; NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[0], true); if ((!PhotonNetwork.isMasterClient && (FengGameManagerMKII.instance.roundTime > 60f)) || FengGameManagerMKII.instance.justSuicide) { FengGameManagerMKII.instance.justSuicide = false; FengGameManagerMKII.instance.NOTSpawnNonAITitan(selection); } else { FengGameManagerMKII.instance.SpawnNonAITitan2(selection, "titanRespawn"); } FengGameManagerMKII.instance.needChooseSide = false; NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[1], false); NGUITools.SetActive(FengGameManagerMKII.instance.uiT.panels[2], false); instance.enabled = false; IN_GAME_MAIN_CAMERA.usingTitan = true; IN_GAME_MAIN_CAMERA.instance.setHUDposition(); } } FengGameManagerMKII.instance.saves(); } GUILayout.EndVertical(); GUILayout.EndArea(); }
void setting_serv() { rectPos_2 = GUILayout.BeginScrollView(rectPos_2); GUILayout.Box(INC.la("titans_settings")); GUILayout.Label(INC.la("ms_only")); float labelwidth = 50; float textFiled = 80; GUICyan.OnToogleCyan(INC.la("custom_titan_number"), 203, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[203] == 1) { GUICyan.OnTextFileCyan(INC.la("amount_integer"), 204, textFiled); } GUICyan.OnToogleCyan(INC.la("custom_titan_spawns"), 210, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[210] == 1) { float t_normal = 0f; if (Single.TryParse((string)FengGameManagerMKII.settings[211], out t_normal)) { t_normal = Convert.ToSingle((string)FengGameManagerMKII.settings[211]); } float t_aberrant = 0f; if (Single.TryParse((string)FengGameManagerMKII.settings[212], out t_aberrant)) { t_aberrant = Convert.ToSingle((string)FengGameManagerMKII.settings[212]); } float t_jumper = 0f; if (Single.TryParse((string)FengGameManagerMKII.settings[213], out t_jumper)) { t_jumper = Convert.ToSingle((string)FengGameManagerMKII.settings[213]); } float t_crawler = 0f; if (Single.TryParse((string)FengGameManagerMKII.settings[214], out t_crawler)) { t_crawler = Convert.ToSingle((string)FengGameManagerMKII.settings[214]); } float t_punk = 0f; if (Single.TryParse((string)FengGameManagerMKII.settings[215], out t_punk)) { t_punk = Convert.ToSingle((string)FengGameManagerMKII.settings[215]); } GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("t_nornal") + " " + t_normal.ToString() + "%.", GUILayout.Width(labelwidth)); if (GUILayout.Button("X")) { t_normal = 0; } GUILayout.EndHorizontal(); t_normal = GUILayout.HorizontalSlider(t_normal, 0, FengGameManagerMKII.instance.titanspawners(0)); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("t_abnormal") + " " + t_aberrant.ToString() + "%.", GUILayout.Width(labelwidth)); if (GUILayout.Button("X")) { t_aberrant = 0; } GUILayout.EndHorizontal(); t_aberrant = GUILayout.HorizontalSlider(t_aberrant, 0, FengGameManagerMKII.instance.titanspawners(1)); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("t_jumper") + " " + t_jumper.ToString() + "%.", GUILayout.Width(labelwidth)); if (GUILayout.Button("X")) { t_jumper = 0; } GUILayout.EndHorizontal(); t_jumper = GUILayout.HorizontalSlider(t_jumper, 0, FengGameManagerMKII.instance.titanspawners(2)); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("t_crawler") + " " + t_crawler.ToString() + "%.", GUILayout.Width(labelwidth)); if (GUILayout.Button("X")) { t_crawler = 0; } GUILayout.EndHorizontal(); t_crawler = GUILayout.HorizontalSlider(t_crawler, 0, FengGameManagerMKII.instance.titanspawners(3)); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("t_punk") + " " + t_punk.ToString() + "%.", GUILayout.Width(labelwidth)); if (GUILayout.Button("X")) { t_punk = 0; } GUILayout.EndHorizontal(); t_punk = GUILayout.HorizontalSlider(t_punk, 0, FengGameManagerMKII.instance.titanspawners(4)); FengGameManagerMKII.settings[211] = Math.Round(t_normal).ToString(); FengGameManagerMKII.settings[212] = Math.Round(t_aberrant).ToString(); FengGameManagerMKII.settings[213] = Math.Round(t_jumper).ToString(); FengGameManagerMKII.settings[214] = Math.Round(t_crawler).ToString(); FengGameManagerMKII.settings[215] = Math.Round(t_punk).ToString(); } GUICyan.OnToogleCyan(INC.la("titan_size_mode"), 207, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[207] == 1) { GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("minimum")); FengGameManagerMKII.settings[208] = GUILayout.TextField((string)FengGameManagerMKII.settings[208], GUILayout.Width(60f)); GUILayout.Label(INC.la("maximum")); FengGameManagerMKII.settings[209] = GUILayout.TextField((string)FengGameManagerMKII.settings[209], GUILayout.Width(60f)); GUILayout.EndHorizontal(); } GUILayout.Label(INC.la("menu_titan_health")); string[] texts = new string[] { INC.la("off"), INC.la("fixed"), INC.la("scaled") }; FengGameManagerMKII.settings[197] = GUILayout.SelectionGrid((int)FengGameManagerMKII.settings[197], texts, 2); if ((int)FengGameManagerMKII.settings[197] != 0) { GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("minimum")); FengGameManagerMKII.settings[198] = GUILayout.TextField((string)FengGameManagerMKII.settings[198], GUILayout.Width(60f)); GUILayout.Label(INC.la("maximum")); FengGameManagerMKII.settings[199] = GUILayout.TextField((string)FengGameManagerMKII.settings[199], GUILayout.Width(60f)); GUILayout.EndHorizontal(); } GUICyan.OnToogleCyan(INC.la("titan_damage_mode"), 205, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[205] != 0) { GUICyan.OnTextFileCyan(INC.la("amount_integer"), 206, textFiled); } GUICyan.OnToogleCyan(INC.la("men_titan_explode"), 195, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[195] != 0) { GUICyan.OnTextFileCyan(INC.la("radius_int"), 196, textFiled); } GUICyan.OnToogleCyan(INC.la("disable_rock_throwing"), 194, 1, 0, labelwidth); GUILayout.Box(INC.la("pvp_settings")); GUICyan.OnToogleCyan(INC.la("point_mode"), 226, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[226] != 0) { GUICyan.OnTextFileCyan(INC.la("max_points_int"), 227, textFiled); } GUICyan.OnToogleCyan(INC.la("pvp_bomb_mode"), 192, 1, 0, labelwidth); GUILayout.Label(INC.la("team_mode")); string[] texts12 = new string[] { INC.la("off"), INC.la("no_sort"), INC.la("size_lock"), INC.la("skill_lock") }; FengGameManagerMKII.settings[193] = GUILayout.SelectionGrid((int)FengGameManagerMKII.settings[193], texts12, 2); GUICyan.OnToogleCyan(INC.la("infection_mode"), 200, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[200] != 0) { GUICyan.OnTextFileCyan(INC.la("starting_titans_int"), 201, textFiled); } GUICyan.OnToogleCyan(INC.la("friendly_mode"), 219, 1, 0, labelwidth); GUILayout.Label(INC.la("sword_ahss_pvp")); string[] texts121 = new string[] { INC.la("off"), INC.la("teams"), INC.la("ffa") }; FengGameManagerMKII.settings[220] = GUILayout.SelectionGrid((int)FengGameManagerMKII.settings[220], texts121, 3); GUICyan.OnToogleCyan(INC.la("no_ahss_air_reloading"), 228, 1, 0, labelwidth); GUICyan.OnToogleCyan(INC.la("cannons_kill_humans"), 261, 1, 0, labelwidth); GUILayout.Box(INC.la("other_settings")); GUILayout.Label(INC.la("message_of_the_day")); FengGameManagerMKII.settings[337] = GUILayout.TextField((string)FengGameManagerMKII.settings[337]); GUICyan.OnToogleCyan(INC.la("custom_titans_wave"), 217, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[217] != 0) { GUICyan.OnTextFileCyan(INC.la("amount_integer"), 218, textFiled); } GUICyan.OnToogleCyan(INC.la("maximum_waves"), 221, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[221] != 0) { GUICyan.OnTextFileCyan(INC.la("amount_integer"), 222, textFiled); } GUICyan.OnToogleCyan(INC.la("punks_every_5_waves"), 229, 1, 0, labelwidth); GUICyan.OnToogleCyan(INC.la("global_minimap_isable"), 235, 1, 0, labelwidth); GUICyan.OnToogleCyan(INC.la("endless_respawn"), 223, 1, 0, labelwidth); if ((int)FengGameManagerMKII.settings[223] != 0) { GUICyan.OnTextFileCyan(INC.la("respawn_time_integer"), 224, textFiled); } GUICyan.OnToogleCyan(INC.la("kick_eren_titan"), 202, 1, 0, labelwidth); GUICyan.OnToogleCyan(INC.la("allow_horses"), 216, 1, 0, labelwidth); GUIStyle colored = new GUIStyle(GUI.skin.box); Color texture = new Color((float)FengGameManagerMKII.settings[246], (float)FengGameManagerMKII.settings[247], (float)FengGameManagerMKII.settings[248], (float)FengGameManagerMKII.settings[249]); colored.normal.textColor = texture; GUILayout.Box(INC.la("bomb_mode_m"), colored); GUILayout.BeginHorizontal(); GUILayout.Label("R:", GUILayout.Width(30f)); FengGameManagerMKII.settings[246] = GUILayout.HorizontalSlider((float)FengGameManagerMKII.settings[246], 0f, 1f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("G:", GUILayout.Width(30f)); FengGameManagerMKII.settings[247] = GUILayout.HorizontalSlider((float)FengGameManagerMKII.settings[247], 0f, 1f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("B:", GUILayout.Width(30f)); FengGameManagerMKII.settings[248] = GUILayout.HorizontalSlider((float)FengGameManagerMKII.settings[248], 0f, 1f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("A:", GUILayout.Width(30f)); FengGameManagerMKII.settings[249] = GUILayout.HorizontalSlider((float)FengGameManagerMKII.settings[249], 0.3f, 1f); GUILayout.EndHorizontal(); int num31 = 20 - (int)FengGameManagerMKII.settings[250] - (int)FengGameManagerMKII.settings[251] - (int)FengGameManagerMKII.settings[252] - (int)FengGameManagerMKII.settings[253]; GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("bomb_radius"), GUILayout.Width(120f)); GUILayout.Label(((int)FengGameManagerMKII.settings[250]).ToString()); if (GUILayout.Button("-")) { if ((int)FengGameManagerMKII.settings[250] > 0) { FengGameManagerMKII.settings[250] = (int)FengGameManagerMKII.settings[250] - 1; } } else if (GUILayout.Button("+") && (int)FengGameManagerMKII.settings[250] < 10 && num31 > 0) { FengGameManagerMKII.settings[250] = (int)FengGameManagerMKII.settings[250] + 1; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("bomb_range"), GUILayout.Width(120f)); GUILayout.Label(((int)FengGameManagerMKII.settings[251]).ToString()); if (GUILayout.Button("-")) { if ((int)FengGameManagerMKII.settings[251] > 0) { FengGameManagerMKII.settings[251] = (int)FengGameManagerMKII.settings[251] - 1; } } else if (GUILayout.Button("+") && (int)FengGameManagerMKII.settings[251] < 10 && num31 > 0) { FengGameManagerMKII.settings[251] = (int)FengGameManagerMKII.settings[251] + 1; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("bomb_speed"), GUILayout.Width(120f)); GUILayout.Label(((int)FengGameManagerMKII.settings[252]).ToString()); if (GUILayout.Button("-")) { if ((int)FengGameManagerMKII.settings[252] > 0) { FengGameManagerMKII.settings[252] = (int)FengGameManagerMKII.settings[252] - 1; } } else if (GUILayout.Button("+") && (int)FengGameManagerMKII.settings[252] < 10 && num31 > 0) { FengGameManagerMKII.settings[252] = (int)FengGameManagerMKII.settings[252] + 1; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("bomb_cd"), GUILayout.Width(120f)); GUILayout.Label(((int)FengGameManagerMKII.settings[253]).ToString()); if (GUILayout.Button("-")) { if ((int)FengGameManagerMKII.settings[253] > 0) { FengGameManagerMKII.settings[253] = (int)FengGameManagerMKII.settings[253] - 1; } } else if (GUILayout.Button("+") && (int)FengGameManagerMKII.settings[253] < 10 && num31 > 0) { FengGameManagerMKII.settings[253] = (int)FengGameManagerMKII.settings[253] + 1; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("unused_points"), GUILayout.Width(120f)); GUILayout.Label(num31.ToString()); GUILayout.EndHorizontal(); GUILayout.EndScrollView(); }
void panel_gui() { GUILayout.BeginArea(CyanPanelRect, GUI.skin.box); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.Width(260f)); GUIStyle style = new GUIStyle(GUI.skin.button); GUILayout.Label(INC.la("lvls_multy")); pos = GUILayout.BeginScrollView(pos); foreach (LevelInfo lvl in levels) { if (!lvl.name.StartsWith("[S]") && lvl.name != "Cage Fighting") { string str = lvl.name; if (current_lvl == lvl) { style.normal = GUI.skin.button.onNormal; str = "[ " + str + " ]"; } else { style.normal = GUI.skin.button.normal; } if (GUILayout.Button(str, style)) { current_lvl = lvl; FengGameManagerMKII.settings[344] = lvl.name; } } } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.Width(200f)); GUILayout.Label(INC.la("diff_multy")); GUIStyle style5 = new GUIStyle(GUI.skin.button); string[] sss = new string[] { INC.la("normal_diff_multy"), INC.la("hard_diff_multy"), INC.la("abnormal_diff_multy") }; for (int i = 0; i < sss.Length; i++) { string ssn = sss[i]; if ((int)FengGameManagerMKII.settings[345] == i) { style5.normal = GUI.skin.button.onNormal; ssn = "[ " + ssn + " ]"; } else { style5.normal = GUI.skin.button.normal; } if (GUILayout.Button(ssn, style5)) { FengGameManagerMKII.settings[345] = i; } } GUILayout.Label(INC.la("day_time_multy")); GUIStyle style4 = new GUIStyle(GUI.skin.button); string[] ssf = new string[] { INC.la("day_multy"), INC.la("dawn_multy"), INC.la("night_multy") }; for (int i = 0; i < ssf.Length; i++) { string ssn = ssf[i]; if ((int)FengGameManagerMKII.settings[346] == i) { style4.normal = GUI.skin.button.onNormal; ssn = "[ " + ssn + " ]"; } else { style4.normal = GUI.skin.button.normal; } if (GUILayout.Button(ssn, style4)) { FengGameManagerMKII.settings[346] = i; } } GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); if (!isSetings) { GUILayout.Label(INC.la("name_multy"), GUILayout.Width(200f)); if (GUILayout.Button(INC.la("settings_multy"))) { isSetings = true; } } else { if (GUILayout.Button(INC.la("back"), GUILayout.Width(120f))) { isSetings = false; } } GUILayout.EndHorizontal(); if (!isSetings) { FengGameManagerMKII.settings[347] = GUILayout.TextField((string)FengGameManagerMKII.settings[347]); GUILayout.Label(INC.la("password_multy")); FengGameManagerMKII.settings[348] = GUILayout.TextField((string)FengGameManagerMKII.settings[348]); GUILayout.Label(INC.la("max_time_multy")); FengGameManagerMKII.settings[349] = GUILayout.TextField((string)FengGameManagerMKII.settings[349]); GUILayout.Label(INC.la("max_player_multy")); FengGameManagerMKII.settings[350] = GUILayout.TextField((string)FengGameManagerMKII.settings[350]); GUILayout.Label(INC.la("color_multy")); FengGameManagerMKII.settings[351] = GUILayout.TextField((string)FengGameManagerMKII.settings[351]); GUILayout.BeginHorizontal(); for (int i = 0; i < color.Length; i++) { string col = color[i]; if (GUILayout.Button("<color=#" + col + "><b>o</b></color>", GUILayout.Width(30f))) { FengGameManagerMKII.settings[351] = "[" + col + "]"; } } GUILayout.EndHorizontal(); } else { setting_serv(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUIStyle styl2 = new GUIStyle(GUI.skin.label); styl2.fontSize = GUI.skin.label.fontSize + 3; GUILayout.Label(INC.la("map_multy") + current_lvl.name + "\n" + INC.la("game_mode_multy") + current_lvl.type + "\n" + INC.la("desc_multy") + current_lvl.desc, styl2); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button(INC.la("creat_multy"), GUILayout.Width(140f), GUILayout.Height(30f))) { string room_name = (string)FengGameManagerMKII.settings[347]; if (room_name.Trim() == string.Empty) { room_name = "Cyan_mod_Server"; } room_name = FengGameManagerMKII.settings[351] + room_name; string day_time = "day"; if ((int)FengGameManagerMKII.settings[346] == 1) { day_time = "dawn"; } else if ((int)FengGameManagerMKII.settings[346] == 2) { day_time = "night"; } string diff = "normal"; if ((int)FengGameManagerMKII.settings[345] == 1) { diff = "hard"; } else if ((int)FengGameManagerMKII.settings[345] == 2) { diff = "abnormal"; } int max_time = 10; if (int.TryParse((string)FengGameManagerMKII.settings[349], out max_time)) { max_time = Convert.ToInt32((string)FengGameManagerMKII.settings[349]); } int max_players = 10; if (int.TryParse((string)FengGameManagerMKII.settings[350], out max_players)) { max_players = Convert.ToInt32((string)FengGameManagerMKII.settings[350]); } string unencrypted = (string)FengGameManagerMKII.settings[348]; if (unencrypted.Trim() != "") { unencrypted = new SimpleAES().Encrypt(unencrypted); } PhotonNetwork.CreateRoom(room_name + "`" + current_lvl.name + "`" + diff + "`" + max_time + "`" + day_time + "`" + unencrypted + "`" + UnityEngine.Random.Range(0, 0xc350), true, true, max_players); FengGameManagerMKII.instance.saves(); } GUILayout.Label(""); if (GUILayout.Button(INC.la("back"), GUILayout.Width(140f), GUILayout.Height(30f))) { NGUITools.SetActive(base.gameObject, false); NGUITools.SetActive(UIMainReferences.instance.panelMain, true); PhotonNetwork.offlineMode = false; PhotonNetwork.Disconnect(); } GUILayout.EndHorizontal(); GUILayout.EndArea(); }
public static Instruccion DescodificarInstruccion(byte codigo, ushort pos) { Instruccion instruccion = null; ArgMemoria argumentoMemoria = Argumento.ConvertirEnArgumento((Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 1)).Contenido * 256 + Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 2)).Contenido).ToString("X4"), true) as ArgMemoria; ArgRegistro argumentoRegistro = Argumento.ConvertirEnArgumento(Main.ObtenerNombreRegistro(codigo % 4), false) as ArgRegistro; ArgLiteral argumentoLiteral = Argumento.ConvertirEnArgumento(Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 1)).Contenido.ToString(), false) as ArgLiteral; switch (codigo / 8) { case 0: instruccion = new LD(argumentoRegistro); break; case 1: instruccion = new ST(argumentoRegistro); break; case 4: case 5: instruccion = new LDM(argumentoMemoria, argumentoRegistro); break; case 6: case 7: instruccion = new STM(argumentoRegistro, argumentoMemoria); break; case 2: case 3: instruccion = new LDI(argumentoLiteral, argumentoRegistro); break; case 8: instruccion = new ADD(argumentoRegistro); break; case 9: instruccion = new SUB(argumentoRegistro); break; case 10: instruccion = new CMP(argumentoRegistro); break; case 11: instruccion = new INC(); break; case 12: instruccion = new ADI(argumentoLiteral); break; case 13: instruccion = new SUI(argumentoLiteral); break; case 14: case 15: instruccion = new CMI(argumentoLiteral); break; case 16: instruccion = new ANA(argumentoRegistro); break; case 17: instruccion = new ORA(argumentoRegistro); break; case 18: instruccion = new XRA(argumentoRegistro); break; case 19: instruccion = new CMA(); break; case 20: instruccion = new ANI(argumentoLiteral); break; case 21: instruccion = new ORI(argumentoLiteral); break; case 22: case 23: instruccion = new XRI(argumentoLiteral); break; case 24: case 25: instruccion = new JMP(argumentoMemoria); break; case 26: instruccion = new BEQ(argumentoMemoria); break; case 27: instruccion = new BC(argumentoMemoria); break; case 28: case 29: instruccion = new LF(); break; case 30: instruccion = new IN(argumentoMemoria, argumentoRegistro); break; case 31: instruccion = new OUT(argumentoRegistro, argumentoMemoria); break; } return(instruccion); }