Example #1
0
    void onStart()
    {
        if (!isShowed)
        {
            return;
        }
        if (!superScrollView.Selected())
        {
            return;
        }
        int l = 8000;

        try
        {
            l = int.Parse(UIHelper.getByName <UIInput>(gameObject, "life_").value);
        }
        catch (Exception)
        {
        }
        string aideck = "";

        if (Config.Get("list_aideck", suiji) == suiji)
        {
            aideck = "ai/ydk/" + list_aideck.items[UnityEngine.Random.Range(1, list_aideck.items.Count)] + ".ydk";
        }
        else
        {
            aideck = "ai/ydk/" + Config.Get("list_aideck", suiji) + ".ydk";
        }
        launch("deck/" + Config.Get("deckInUse", "miaowu") + ".ydk", aideck, "ai/" + Config.Get("list_airank", "ai") + ".lua", UIHelper.getByName <UIToggle>(gameObject, "first_").value, UIHelper.getByName <UIToggle>(gameObject, "unrand_").value, l, UIHelper.getByName <UIToggle>(gameObject, "god_").value, UIHelper.getByName <UIToggle>(gameObject, "mr4_").value ? 4 : 3);
    }
Example #2
0
 void onEdit()
 {
     if (!superScrollView.Selected())
     {
         return;
     }
     if (!isShowed)
     {
         return;
     }
     KF_editDeck(superScrollView.selectedString);
 }
Example #3
0
 private void onLaunch()
 {
     if (!superScrollView.Selected())
     {
         return;
     }
     if (!isShowed)
     {
         return;
     }
     KF_replay(superScrollView.selectedString);
 }
Example #4
0
 void listenerForClicked(GameObject gameObjectListened)
 {
     if (gameObjectListened.name == "exit_")
     {
         Program.I().ocgcore.onExit();
     }
     if (gameObjectListened.name == "ready_")
     {
         if (selftype < realPlayers.Length && realPlayers[selftype] != null)
         {
             if (realPlayers[selftype].getIfPreped())
             {
                 TcpHelper.CtosMessage_HsNotReady();
             }
             else
             {
                 TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + Config.Get("deckInUse", "") + ".ydk"));
                 TcpHelper.CtosMessage_HsReady();
             }
         }
     }
     if (gameObjectListened.name == "duelist_")
     {
         TcpHelper.CtosMessage_HsToDuelist();
     }
     if (gameObjectListened.name == "observer_")
     {
         TcpHelper.CtosMessage_HsToObserver();
     }
     if (gameObjectListened.name == "start_")
     {
         if (!superScrollView.Selected())
         {
             return;
         }
         TcpHelper.CtosMessage_HsStart();
     }
 }