Exemplo n.º 1
0
 public void launch(string path)
 {
     if (precy != null)
     {
         precy.dispose();
     }
     precy = new PrecyOcg();
     precy.startPuzzle(path);
 }
Exemplo n.º 2
0
 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不会在联机的时候出现。"));
 }
Exemplo n.º 3
0
 public void KF_replay(string name, bool god = false)
 {
     try
     {
         if (File.Exists("replay/" + name + ".yrp3d"))
         {
             if (god)
             {
                 RMSshow_none(InterString.Get("您正在观看旧版的录像(上帝视角),不保证稳定性。"));
                 if (precy != null)
                 {
                     precy.dispose();
                 }
                 precy = new PrecyOcg();
                 var replays     = getYRPbuffer("replay/" + name + ".yrp3d");
                 var collections = TcpHelper.getPackages(precy.ygopro.getYRP3dBuffer(getYRP(replays[replays.Count - 1])));
                 pushCollection(collections);
             }
             else
             {
                 var collection = TcpHelper.readPackagesInRecord("replay/" + name + ".yrp3d");
                 pushCollection(collection);
             }
         }
         else
         {
             if (name.Length > 4 && name.Substring(name.Length - 4, 4) == ".yrp")
             {
                 if (File.Exists("replay/" + name))
                 {
                     RMSshow_none(InterString.Get("您正在观看旧版的录像(上帝视角),不保证稳定性。"));
                     if (precy != null)
                     {
                         precy.dispose();
                     }
                     precy = new PrecyOcg();
                     var collections = TcpHelper.getPackages(precy.ygopro.getYRP3dBuffer(getYRP(File.ReadAllBytes("replay/" + name))));
                     pushCollection(collections);
                 }
             }
         }
     }
     catch (Exception)
     {
         RMSshow_none(InterString.Get("录像没有录制完整。"));
         RMSshow_none(InterString.Get("MATCH局中可能只有最后一局决斗才包含旧版录像信息。"));
     }
 }