public void KF_editDeck(string deckName) { string path = "deck/" + deckName + ".ydk"; if (File.Exists(path)) { Config.Set("deckInUse", deckName); ((DeckManager)Program.I().deckManager).shiftCondition(DeckManager.Condition.editDeck); Program.I().shiftToServant(Program.I().deckManager); ((DeckManager)Program.I().deckManager).loadDeckFromYDK(path); ((CardDescription)Program.I().cardDescription).setTitle(deckName); ((DeckManager)Program.I().deckManager).setGoodLooking(); ((DeckManager)Program.I().deckManager).returnAction = () => { RMSshow_yesOrNoOrCancle( "deckManager_returnAction" , InterString.Get("要保存卡组的变更吗?") , new messageSystemValue { hint = "yes", value = "yes" } , new messageSystemValue { hint = "no", value = "no" } , new messageSystemValue { hint = "cancle", value = "cancle" } ); }; } }
internal static void initialize(string databaseFullPath) { nullName = InterString.Get("未知卡片"); nullString = ""; nullString += "Welcome YGOPro 2"; //nullString += "\r\n\r\n"; //nullString += "License"; //if (File.Exists("config/link.conf")) //{ //nullString += "\r\n"; //nullString += "[url=http://ygopro2.lofter.com/lisence][u]http://ygopro2.lofter.com/lisence[/u][/url]"; //nullString += "\r\n\r\n"; //nullString += "Official website:\r\n[url=http://ygopro2.lofter.com][u]http://ygopro2.lofter.com[/u][/url]\r\n"; //} nullString += "\r\n"; nullString += "Credits:\r\n * Froge / Iliyasviel (Developer) \r\n * KhrisKH (Compiled, Translated, Spanish) \r\n * AntiMetaman (pics, textures, closeup, translated) \r\n * edo9300 (ygocore) \r\n * Mercury233 (server) \r\n * Gideon (server) \r\n * Eerie Code, MLD, andre, Shad3, Cybercatman, GameMaster, TOP, Lyris, Senpaizuri, AlphaKretin, Steelren, and all other scripters (Scripting) \r\n * Ace, Lord of Nightmares, Tea82, deisuke, Procyon, Juan-K (artwork)"; nullString += " "; nullString = ""; using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) { connection.Open(); using (IDbCommand command = new SqliteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;", connection)) { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { LoadCard(reader); } } } } }
void onCheckUpgrade() { Program.PrintToChat(InterString.Get("正在检测是否有新版本!")); try { CheckUpgrade(); if (VERSION != Program.GAME_VERSION) { RMSshow_yesOrNo ( "RMSshow_onlyYes", InterString.Get("发现新版本,是否立即下载?"), new messageSystemValue { hint = "yes", value = "yes" }, new messageSystemValue { hint = "no", value = "no" } ); } else { showToast("已是最新版本!"); } } catch (System.Exception e) { showToast("检查更新失败!"); } }
private void onYrp() { if (!superScrollView.Selected()) { return; } try { if (File.Exists("replay/" + superScrollView.selectedString + ".yrp3d")) { var replays = getYRPbuffer("replay/" + superScrollView.selectedString + ".yrp3d"); for (int i = 1; i <= replays.Count; i++) { string filename = "replay/" + superScrollView.selectedString + "-Game" + i + ".yrp"; File.WriteAllBytes(filename, replays[i - 1]); RMSshow_none(InterString.Get("录像入库:[?]", filename)); } printFile(); } else { RMSshow_none(InterString.Get("录像没有录制完整。")); RMSshow_none(InterString.Get("MATCH局中可能只有最后一局决斗才包含旧版录像信息。")); } } catch (Exception) { RMSshow_none(InterString.Get("录像没有录制完整。")); RMSshow_none(InterString.Get("MATCH局中可能只有最后一局决斗才包含旧版录像信息。")); } }
public void StocMessage_DuelStart(BinaryReader r) { BGMController.Instance.StartBGM(BGMController.BGMType.siding); Program.I().ocgcore.returnServant = Program.I().selectServer; needSide = false; joinWithReconnect = true; if (Program.I().deckManager.isShowed) { Program.I().deckManager.hide(); RMSshow_onlyYes("", InterString.Get("更换副卡组成功,请等待对手更换副卡组。"), null); } if (isShowed) { hide(); } if (selftype < 4) { Program.I().ocgcore.shiftCondition(Ocgcore.Condition.duel); } else { Program.I().ocgcore.shiftCondition(Ocgcore.Condition.watch); } Program.I().ocgcore.showBarOnly(); }
IEnumerator OnScreenCapture() { yield return(new WaitForEndOfFrame()); try { if (!Directory.Exists("screenshots/")) { Directory.CreateDirectory("screenshots/"); } string imageName = "screenshots/" + DateTime.Now.ToString("yyyy-MM-dd(HH’mm’ss)") + ".png"; int width = Screen.width; int height = Screen.height; Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false); tex.ReadPixels(new Rect(0, 0, width, height), 0, 0, true); byte[] imageBytes = tex.EncodeToPNG(); tex.Compress(false); File.WriteAllBytes(imageName, imageBytes); PrintToChat(InterString.Get("触发截屏,文件位于资源目录下:screenshots/")); } catch (System.Exception e) { Debug.Log(e); } }
public void KF_onlineGame(string Name, string ipString, string portString, string versionString, string pswString = "") { name = Name; Config.Set("name", name); if (ipString == "" || portString == "" || versionString == "") { RMSshow_onlyYes("", InterString.Get("非法输入!请检查输入的主机名。"), null); } else { if (name != "") { string fantasty = "psw: " + pswString; list.items.Remove(fantasty); list.items.Insert(0, fantasty); list.value = fantasty; if (list.items.Count > 5) { list.items.RemoveAt(list.items.Count - 1); } string all = ""; for (int i = 0; i < list.items.Count; i++) { all += list.items[i] + "\r\n"; } File.WriteAllText("config/passwords.conf", all); printFile(false); (new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start(); } else { RMSshow_onlyYes("", InterString.Get("昵称不能为空。"), null); } } }
void onReset() { if (Screen.width >= 2300) { underSprite.width = 420; picSprite.height = 525; description.textLabel.fontSize = 30; } else if (Screen.width >= 1900) { underSprite.width = 360; picSprite.height = 445; description.textLabel.fontSize = 25; } else if (Screen.width >= 1500) { underSprite.width = 300; picSprite.height = 365; description.textLabel.fontSize = 20; } else { underSprite.width = 240; picSprite.height = 285; description.textLabel.fontSize = 15; } Program.PrintToChat(InterString.Get("已重置调整,如不合适请自行调整")); }
public PrecyOcg() { _buffer = Marshal.AllocHGlobal(1024 * 256); // 256 KiB error = InterString.Get("Error occurred! @nError occurred! @nError occurred! @nError occurred! @nError occurred! @nError occurred! @nYGOPro1旧版的录像崩溃了!您可以选择使用永不崩溃的新版录像。"); ygopro = new Percy.smallYgopro(receiveHandler, cardHandler, scriptHandler, chatHandler); ygopro.m_log = (a) => { Program.DEBUGLOG(a); }; }
internal static void initialize(string databaseFullPath) { nullName = InterString.Get("未知卡片"); nullString = ""; nullString += "欢迎使用 YGOPro2"; nullString += "\r\n\r\n"; nullString += "官方网站:"; nullString += "\r\n"; nullString += "[url=https://ygopro2.lofter.com/][u]https://ygopro2.lofter.com/[/u][/url]"; nullString += "\r\n\r\n"; nullString += "公测玩家交流群:\r\n[url=https://jq.qq.com/?_wv=1027&k=42Gsxgd][u]580454979[/u][/url]"; using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) { connection.Open(); using (IDbCommand command = new SqliteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;", connection)) { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { LoadCard(reader); } } } } }
internal static void initialize(string databaseFullPath) { nullName = InterString.Get("未知卡片"); nullString = ""; nullString += "YGOPRO 2"; nullString += "\r\n\r\n"; nullString += "Release by: Kaiba Corporation ([url=ygopro.org][u]ygopro.org[/u][/url]) \r\n\r\n"; nullString += "YGOPRO 2 is currently in beta testing, please report any bugs you find on our forum: ([url=ygopro.club][u]ygopro.club[/u][/url]) \r\n\r\n"; nullString += "Join the official YGOPRO 2 Discord server to get the latest news and information about upcoming updates: [url=ygopro.org/discord][u]ygopro.org/discord[/u][/url] \r\n\r\n"; nullString += "YGOPRO 2 is open source, anyone with programming knowledge can contribute bug fixes directly by making pull requests on our github page: [url=github.com/Kaiba-Corporation/YGOProUnity_V2][u]github.com/Kaiba-Corporation/YGOProUnity_V2[/u][/url] \r\n\r\n"; nullString += "Special thanks to Fluorohydride, lllyasviel, IceYGO, Mercury233, Duelists Unite team and others for creating YGOPRO 2 and other required software, without them this game wouldn't have been possible. For a full list of credits please visit: [url=ygopro.org/credits][u]ygopro.org/credits[/u][/url] \r\n\r\n"; using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) { connection.Open(); using (IDbCommand command = new SqliteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;", connection)) { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { LoadCard(reader); } } } } }
internal static void initialize(string databaseFullPath) { nullName = InterString.Get("未知卡片"); nullString = ""; nullString += "欢迎使用 YGOPro2 1033.D.3"; nullString += "\r\n\r\n"; nullString += "使用本软件竞技前请在官方网站阅读竞技声明。"; //if (File.Exists("config/link.conf")) //{ nullString += "\r\n"; nullString += "[url=http://ygopro2.lofter.com/lisence][u]http://ygopro2.lofter.com/lisence[/u][/url]"; nullString += "\r\n\r\n"; nullString += "官方网站:\r\n[url=http://ygopro2.lofter.com][u]http://ygopro2.lofter.com[/u][/url]\r\n请随时关注此页面的新卡消息和程序更新消息。"; //} nullString += "\r\n\r\n"; nullString += "公测玩家交流群:\r\n[url=https://jq.qq.com/?_wv=1027&k=42Gsxgd][u]580454979[/u][/url]"; nullString += "\r\n[url=https://jq.qq.com/?_wv=1027&k=44aGRzz][u]428563714[/u][/url]"; using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) { connection.Open(); using (IDbCommand command = new SqliteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;", connection)) { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { LoadCard(reader); } } } } }
internal static void initialize(string databaseFullPath) { nullName = InterString.Get("未知卡片"); nullString = ""; nullString += "欢迎使用:\r\nYGOPro2 For Windows"; nullString += "\r\n\r\n"; nullString += "软件下载:"; nullString += "\r\n①:[url=https://pan.baidu.com/s/1PEulJRq8ztugD7PtH0ZSlA][u]https://pan.baidu.com/s/1PEulJRq8ztugD7PtH0ZSlA[/u][/url]"; nullString += "\r\n\r\n②:[url=https://github.com/Unicorn369/YGOPro2_Droid/releases][u]https://github.com/Unicorn369/YGOPro2_Droid/releases[/u][/url]"; nullString += "\r\n\r\n\r\n"; nullString += "欢迎加入QQ群:"; nullString += "\r\n①:[url=https://jq.qq.com/?_wv=1027&k=5nq6xJe][u]649612818[/u][/url]"; nullString += "\r\n③:[url=https://jq.qq.com/?_wv=1027&k=50MZVQA][u]831010207[/u][/url]"; nullString += "\r\n②:[url=https://jq.qq.com/?_wv=1027&k=5idyod3][u]559276772[/u][/url]"; using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath)) { connection.Open(); using (IDbCommand command = new SqliteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;", connection)) { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { LoadCard(reader); } } } } }
void onwiki() { RMSshow_yesOrNo("RMSshow_onWiki", InterString.Get("是否在线查询卡片调整?"), new messageSystemValue { hint = "yes", value = "yes" }, new messageSystemValue { hint = "no", value = "no" }); }
public void StocMessage_ErrorMsg(BinaryReader r) { int msg = r.ReadByte(); int code = 0; switch (msg) { case 1: r.ReadByte(); r.ReadByte(); r.ReadByte(); code = r.ReadInt32(); switch (code) { case 0: RMSshow_onlyYes("", GameStringManager.get_unsafe(1403), null); break; case 1: RMSshow_onlyYes("", GameStringManager.get_unsafe(1404), null); break; case 2: RMSshow_onlyYes("", GameStringManager.get_unsafe(1405), null); break; } break; case 2: r.ReadByte(); r.ReadByte(); r.ReadByte(); code = r.ReadInt32(); switch (code) { case 1: RMSshow_onlyYes("", GameStringManager.get_unsafe(1406), null); break; default: RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name), null); break; } break; case 3: RMSshow_onlyYes("", InterString.Get("更换副卡组失败,请检查卡片张数是否一致。"), null); break; case 4: RMSshow_none(InterString.Get("你输入的版本号和服务器不一致。")); break; default: break; } }
void showAll() { if (location == CardLocation.Grave && Program.I().ocgcore.cantCheckGrave) { Program.I().cardDescription.RMSshow_none(InterString.Get("不能确认墓地里的卡")); return; } bool allShow = true; for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player) { if (Program.I().ocgcore.cards[i].isShowed == false) { if (Program.I().ocgcore.cards[i].prefered == true) { allShow = false; } } } } } } for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player) { if (allShow) { Program.I().ocgcore.cards[i].isShowed = true; } else { if (Program.I().ocgcore.cards[i].prefered == true) { Program.I().ocgcore.cards[i].isShowed = true; } } } } } } Program.I().ocgcore.realize(); Program.I().ocgcore.toNearest(); Program.I().audio.clip = Program.I().zhankai; Program.I().audio.Play(); }
public void launch(string playerDek, string aiDeck, string aiScript, bool playerGo, bool suffle, int life, bool god, int rule) { if (precy != null) { precy.dispose(); } precy = new PrecyOcg(); precy.startAI(playerDek, aiDeck, aiScript, playerGo, suffle, life, god, rule); RMSshow_none(InterString.Get("AI模式还在开发中,您在AI模式下遇到的BUG不会在联机的时候出现。")); }
public override void preFrameFunction() { base.preFrameFunction(); if (upurl != "" && outed == false) { outed = true; RMSshow_onlyYes("RMSshow_onlyYes", InterString.Get("发现更新!@n你可以免费下载"), null); } Menu.checkCommend(); }
// Update is called once per frame void Update() { if (loaded == false) { if (InterString.loaded == true) { loaded = true; str = InterString.Get(str); } } }
public static string GetName(uint hash) { for (int i = 0; i < Banlists.Count; i++) { if (Banlists[i].Hash == hash) { return(Banlists[i].Name); } } return(InterString.Get("未知卡表")); }
// Update is called once per frame void Update() { a += Time.deltaTime; string t = ""; for (int i = 0; i < (((int)(a * 60)) / 20) % 4; i++) { t += InterString.Get("…"); } lab.text = t + s + t; }
private void setSortLable() { if (Config.Get(sort, "1") == "1") { UIHelper.trySetLableText(gameObject, "sort_", InterString.Get("时间排序")); } else { UIHelper.trySetLableText(gameObject, "sort_", InterString.Get("名称排序")); } }
void onJoin() { if (roomPSWLabel.text != "") { onSelected(); } else { Program.PrintToChat(InterString.Get("请选择房间!!!")); } }
public static void InterGameObject(GameObject father) { var all = father.transform.GetComponentsInChildren <UILabel>(); for (int i = 0; i < all.Length; i++) { if ((all[i].name.Length > 1 && all[i].name[0] == '!') || all[i].name == "yes_" || all[i].name == "no_") { all[i].text = InterString.Get(all[i].text); } } }
void onValue() { RMSshow_yesOrNo( "onValue", InterString.Get("您确定要删除所有未命名的录像?"), new messageSystemValue { hint = "yes", value = "yes" }, new messageSystemValue { hint = "no", value = "no" }); }
public override void initialize() { kacha = InterString.Get("卡差:"); changcha = InterString.Get("场差:"); xuecha = InterString.Get("血差:"); gameObject = createWindow(this, Program.I().new_ui_book); texts = gameObject.GetComponentInChildren <lazyBookbtns>(); texts.textlist.scrollValue = 1; texts.textlist.lockDrag = true; UIHelper.registEvent(gameObject, "exit_", hide); applyHideArrangement(); }
void onRenameCategory() { if (decksList.value != "[---------------]") { onDeckCategory(); RMSshow_input("onRenameCategory", InterString.Get("请输入新的卡组分类名"), UIHelper.getTimeString()); } else { showToast("默认分类,无法重命名!"); } }
void onRename() { if (!superScrollView.Selected()) { return; } string path = DECK_PATH + superScrollView.selectedString + ".ydk"; if (File.Exists(path)) { RMSshow_input("onRename", InterString.Get("新的卡组名"), superScrollView.selectedString); } }
void onRename() { if (!superScrollView.Selected()) { return; } string path = "Assets/essential/deck/" + superScrollView.selectedString + ".ydk"; if (File.Exists(path)) { RMSshow_input("onRename", InterString.Get("新的卡组名"), superScrollView.selectedString); } }
public override void initialize() { gameObject = create ( Program.I().new_ui_cardDescription, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), new Vector3(0, 0, 0), true, Program.ui_back_ground_2d ); picLoader = gameObject.AddComponent <cardPicLoader>(); picLoader.code = 0; picLoader.uiTexture = UIHelper.getByName <UITexture>(gameObject, "pic_"); picLoader.loaded_code = -1; resizer = UIHelper.getByName <UIDragResize>(gameObject, "resizer"); underSprite = UIHelper.getByName <UITexture>(gameObject, "under_"); description = UIHelper.getByName <UITextList>(gameObject, "description_"); cardShowerWidget = UIHelper.getByName <UIWidget>(gameObject, "card_shower"); monitor = UIHelper.getByName <UIPanel>(gameObject, "monitor"); deckPanel = gameObject.GetComponentInChildren <UIDeckPanel>(); line = UIHelper.getByName(gameObject, "line"); UIHelper.registEvent(gameObject, "pre_", onPre); UIHelper.registEvent(gameObject, "next_", onNext); UIHelper.registEvent(gameObject, "big_", onb); UIHelper.registEvent(gameObject, "small_", ons); UIHelper.registEvent(gameObject, "wiki_", onwiki); UIHelper.registEvent(gameObject, "reset_", onReset); picSprite = UIHelper.getByName <UITexture>(gameObject, "pic_"); lineSprite = UIHelper.getByName <UISprite>(gameObject, "line"); try { description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24")); } catch (System.Exception e) { } read(); myGraveStr = InterString.Get("我方墓地:"); myExtraStr = InterString.Get("我方额外:"); myBanishedStr = InterString.Get("我方除外:"); opGraveStr = InterString.Get("[8888FF]对方墓地:[-]"); opExtraStr = InterString.Get("[8888FF]对方额外:[-]"); opBanishedStr = InterString.Get("[8888FF]对方除外:[-]"); for (int i = 0; i < quickCards.Length; i++) { quickCards[i] = deckPanel.createCard(); quickCards[i].relayer(i); } monitor.gameObject.SetActive(false); }