Example #1
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", "wizard") + ".ydk"));
                 TcpHelper.CtosMessage_HsReady();
             }
         }
     }
     if (gameObjectListened.name == "duelist_")
     {
         TcpHelper.CtosMessage_HsToDuelist();
     }
     if (gameObjectListened.name == "observer_")
     {
         TcpHelper.CtosMessage_HsToObserver();
     }
     if (gameObjectListened.name == "start_")
     {
         TcpHelper.CtosMessage_HsStart();
     }
 }
Example #2
0
 void onSelected()
 {
     Config.Set("deckInUse", superScrollView.selectedString);
     if (selftype < realPlayers.Length && realPlayers[selftype] != null && realPlayers[selftype].getIfPreped())
     {
         TcpHelper.CtosMessage_HsNotReady();
         TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + superScrollView.selectedString + ".ydk"));
         TcpHelper.CtosMessage_HsReady();
     }
 }
Example #3
0
 private void onPrepareChanged(int arg1, bool arg2)
 {
     if (roomPlayers[arg1] != null)
     {
         roomPlayers[arg1].prep = arg2;
     }
     if (arg2)
     {
         TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + Config.Get("deckInUse", "miaouwu") + ".ydk"));
         TcpHelper.CtosMessage_HsReady();
     }
     else
     {
         TcpHelper.CtosMessage_HsNotReady();
     }
 }
Example #4
0
    void onSelected()
    {
        Config.Set("deckInUse", superScrollView.selectedString);

        if (selftype < realPlayers.Length)
        {
            if (realPlayers[selftype] != null)
            {
                if (realPlayers[selftype].getIfPreped() == true)
                {
                    TcpHelper.CtosMessage_HsNotReady();
                    TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck(DECK_PATH + Config.Get("deckInUse", "wizard") + ".ydk"));
                    TcpHelper.CtosMessage_HsReady();
                }
            }
        }
    }
Example #5
0
 private void onPrepareChanged(int arg1, bool arg2)
 {
     if (roomPlayers[arg1] != null)
     {
         roomPlayers[arg1].prep = arg2;
     }
     if (arg2)
     {
         ColorGreen("ready_");//已准备
         TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck(DECK_PATH + Config.Get("deckInUse", "miaouwu") + ".ydk"));
         TcpHelper.CtosMessage_HsReady();
     }
     else
     {
         ColorRed("ready_");//未准备
         TcpHelper.CtosMessage_HsNotReady();
     }
 }