Example #1
0
    public void SetBotPlayerInfo()
    {
        int botCNum = WAS.isKicker ? Tbl.arrKickBotCard.Count : Tbl.arrKeepBotCard.Count;

        Ag.LogString(" Bot Player Info  ::   arr Num ? >>   " + botCNum);
        WasCard curCrd = WAS.isKicker ? Tbl.arrKickBotCard [AgUtil.RandomInclude(0, botCNum - 1)] : Tbl.arrKeepBotCard [AgUtil.RandomInclude(0, botCNum - 1)];

        WAS.country = curCrd.country;
        WAS.look    = curCrd.look;
        //  JKLeeMustFinishThis
    }
    public override void Start()  // Imsi
    {
        //Purchase = PurchaseType.Nstore;

        Ag.LogIntenseWord(" MenuManager    Started ..... ");
        //mGameMatchOk = false;
        Ag.SingleTry    = 0;
        Ag.CurrentScene = "MENU";

        //-----------Popup Cash Item
        int ran = AgUtil.RandomInclude(1, 999);

        //if (Ag.mySelf.MinutesAfterRegist > 1440 && ran % 5 < 5) // 100 % @ 411


        Ag.ContGameNum = 0;
        mBackDepthFlag = false;
        MailItemInit();
        InitInAppPurchaseIOSnADR();
        mFriendId = "";
        Ag.mySelf.SetCostumeToCard();
        //FriendRank ();
        mwas                   = new WasCard();
        mCard                  = new AmCard();
        mRankFriend            = new WasRank();
        BarObj                 = new List <GameObject> ();
        mTimeLooseAtStartPoint = 0f;
        Ag.LogIntenseWord(" MenuManager :: Start  .. Game Init ()  ");
        LoadMenuResources();
        SettingLocal();

        // '킥오프' 주황색 버튼
        BtnKickOff.MakeAbility(true);
//        BtnKickOff.SetObjectsWithAlt ( FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready2", false), null,
//            FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready", true));


        if (Ag.mGuest)
        {
            Ag.mySelf.WAS.profileURL = "";
            Ag.mySelf.WAS.KkoNick    = "No name";
            Ag.mySelf.KkoNickEncode  = "No name";
        }
        else
        {
            Ag.mySelf.WAS.profileURL  = StcPlatform.ProfileURL;
            Ag.mySelf.WAS.KkoNick     = StcPlatform.PltmNick;
            Ag.mySelf.KkoNickEncode   = WWW.EscapeURL(StcPlatform.PltmNick);
            Ag.mySelf.TeamNameEncoded = WWW.EscapeURL(Ag.mySelf.WAS.TeamName);
        }

        if (PreviewLabs.PlayerPrefs.GetBool("DidTutorial"))
        {
            AgStt.mgGameTutorial = false;
        }
        else
        {
            AgStt.mgGameTutorial = true;
        }

        #if UNITY_EDITOR
        PreviewLabs.PlayerPrefs.SetBool("DidTutorial", true);
        AgStt.mgGameTutorial = false;
        #endif

        //GitIgnoreThis.GitIgnoreTutorial ();

        addsendmessageTutorPanel();

        Ag.LogIntenseWord(" MenuManager :: Start  .. for  ");

        for (int i = 0; i < KakaoFriends.Instance.appFriends.Count; i++)
        {
            if (i == KakaoFriends.Instance.appFriends.Count - 1)
            {
                mFriendId += KakaoFriends.Instance.appFriends [i].userid;
            }
            else
            {
                mFriendId += KakaoFriends.Instance.appFriends [i].userid + ",";
            }
            Debug.Log(mFriendId);
        }

        Kick_OffInit();
        PriceSetting();
        SetNodeDelegate();



        Ag.LogIntenseWord(" MenuManager :: Start  .. Sale Item  ");

        SaleItemSetting();
        //pushSetting ();

        Ag.mViewCard.CardLeagueSpritename(Ag.mySelf.WAS.League);

        Ag.LogIntenseWord(" MenuManager :: Start  .. spriteName  " + Ag.mySelf.WAS.League + Ag.mViewCard.LeagueSpriteNameS);
        dicMenuList ["Lobby_division"].GetComponent <UISprite> ().spriteName    = Ag.mViewCard.LeagueSpriteNameS;
        dicMenuList ["Ui_team_division"].GetComponent <UISprite> ().spriteName  = Ag.mViewCard.LeagueSpriteNameS;
        dicMenuList ["MY_Label_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS;


        //   Debug.Log (GiftRewardCode()+"   gift");

        #if UNITY_ANDROID
        var skus = new string[] {
            "com.prime31.testproduct",
            "android.test.purchased",
            "com.prime31.managedproduct",
            "com.prime31.testsubscription"
        };
        GoogleIAB.queryInventory(skus);
        #endif

        Ag.mySelf.ApplyCurrentDeck();
        Ag.LogIntenseWord(" MenuManager :: Start  .. End ....   ");
        //ShowDeckEffLabel ();

        InitFriendRank();

        if (Ag.mGameStartAlready)
        {
            Btn_Fun_MatchRequire();
            PopupAfterGameEnd();
            if (Ag.mBlueItemFlag)
            {
                StartCoroutine(btn_auto_label_Priceoff());
            }
        }
        else
        {
            if (Ag.mySelf.MinutesAfterRegist > 60 && ran % 20 == 3) // 5% ...  // ran % 5 < 5) // 100 % @ 411
            {
                PopupAfterUserCash();
            }
            BannerEventAction();
//            if (!PreviewLabs.PlayerPrefs.GetBool ("FirstCharge_check")) {
//                dicMenuList ["Ui_popup"].SetActive (true);
//                dicMenuList ["first_purchase"].SetActive (true);
//            }
        }
    }