void DiagHandler(DialogueMgr.BTNS btn)
 {
     if (btn == DialogueMgr.BTNS.Btn1)
     {
         if (UserMgr.UserInfo.gold < 50)
         {
             DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrError"), UtilMgr.GetLocalText("StrNotEnoughGold2"), DialogueMgr.DIALOGUE_TYPE.Alert, null);
             return;
         }
         mOffEvent = new SetSkillEvent(ReceivedOff);
         NetMgr.OffSkill(transform.root.FindChild("PlayerCard").GetComponent <PlayerCard>().mCardInfo, mInfo,
                         int.Parse(transform.name.Substring(transform.name.Length - 1, 1)), mOffEvent);
     }
 }
Esempio n. 2
0
    private void HandleDataReceive(IAsyncResult ar)
    {
        Int32 recvBytes = 0;

        try{
            recvBytes = mSocket.EndReceive(ar);
        } catch {
            Debug.Log("recv error");
//			Alive();
            return;
        }

        // 수신받은 자료의 크기가 1 이상일 때에만 자료 처리
        if (recvBytes > 0)
        {
            mRecvSemaphore = true;

            Byte[] msgByte = new Byte[recvBytes];
            Array.Copy(mReceiveBuffer, msgByte, recvBytes);
            string msg = Encoding.UTF8.GetString(msgByte);

            // 받은 메세지를 출력
            Debug.Log("Received : " + msg);
//			msg += msg;
            string[] msgArr = msg.Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
//			if(msgArr.Length > 1){
//				DialogueMgr.ShowDialogue("adasd", UtilMgr.GetDateTimeNow("HH:mm:ss"), DialogueMgr.DIALOGUE_TYPE.Alert
//				                         ,null);
//			}
            for (int i = 0; i < msgArr.Length; i++)
            {
//				Debug.Log("Received(" + i + ") : " + msgArr[i]);
                SocketMsgInfo msgInfo = Newtonsoft.Json.JsonConvert.DeserializeObject <SocketMsgInfo>(msgArr[i]);
                if (!UtilMgr.OnPause &&
                    UtilMgr.GetLastBackState() == UtilMgr.STATE.LiveBingo)
                {
                    mSocketMsgList.Add(msgInfo);
                }
            }
            mRecvSemaphore = false;
        }

        try {
            mSocket.BeginReceive(mReceiveBuffer, 0, mReceiveBuffer.Length, SocketFlags.None, mReceivingCallback, null);
        } catch (Exception ex) {
            // 예외가 발생하면 mReceiveBuffer 종료한다mReceiveBuffer("자료 수신 대기 도중 오류 발생! 메세지: "+ ex.Message);
            Instance.socketJoinEvent();
            return;
        }
    }
Esempio n. 3
0
    public void Init()
    {
        transform.FindChild("ContainerBtns").localPosition = new Vector3(0, UtilMgr.GetScaledPositionY() * 2, 0);

        transform.FindChild("ContainerBtns").gameObject.SetActive(false);
        transform.FindChild("WindowEmail").gameObject.SetActive(false);
        transform.FindChild("FormJoin").gameObject.SetActive(false);
        transform.FindChild("ContainerBtns").gameObject.SetActive(false);
        transform.FindChild("SelectTeam").gameObject.SetActive(false);

        transform.FindChild("SprLogo").gameObject.SetActive(true);

        CheckPreference();
    }
Esempio n. 4
0
    IEnumerator ShowBingoResult()
    {
        transform.FindChild("PtcBingo").gameObject.SetActive(true);
        transform.FindChild("PtcBingo").GetComponent <ParticleSystem>().Play();

        yield return(new WaitForSeconds(2f));

        DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("LblBingo"),
                                 string.Format(UtilMgr.GetLocalText("StrRewardBingo")
                                               , mCallResponse.data.userRewardGold
                                               , mCallResponse.data.totalRewarded
                                               , mCallResponse.data.rewardCount)
                                 , DialogueMgr.DIALOGUE_TYPE.Alert, BingoDialogue);
    }
Esempio n. 5
0
    bool OnWebViewShouldClose(UniWebView webView)
    {
        Debug.Log("OnWebViewShouldClose");
        UtilMgr.OnBackPressed();

        return(false);

        if (webView == mWebView)
        {
            mWebView = null;
            return(true);
        }
        return(false);
    }
Esempio n. 6
0
    void LoginFailed()
    {
        //        PlayerPrefs.SetString(Constants.PrefEmail, "");
        //        PlayerPrefs.SetString(Constants.PrefPwd, "");
        PlayerPrefs.SetString(Constants.PrefNick, "");
        UtilMgr.RemoveAllBackEvents();
        Init();
        string title = gameObject.GetComponent <PlayMakerFSM>().FsmVariables.FindFsmString("loginFailedTitle").Value;
        string body  = gameObject.GetComponent <PlayMakerFSM>().FsmVariables.FindFsmString("loginFailedBody").Value;

        DialogueMgr.ShowDialogue(
            title, body, DialogueMgr.DIALOGUE_TYPE.Alert, "", "", "", null);
        UtilMgr.AddBackEvent(new EventDelegate(transform.root.GetComponent <ScriptLoginRoot>(), "DismissDialogue"));
    }
Esempio n. 7
0
    void Setting()
    {
        UserImagePath = mProfileEvent.Response.data.imagePath;
        UserImageName = mProfileEvent.Response.data.imageName;
        UserName      = mProfileEvent.Response.data.memberName;
        //Debug.Log ("UserName : "******"GetTeamCode : " + mProfileEvent.Response.data.GetTeamCode());
        UserTeamFullName = mProfileEvent.Response.data.GetTeamFullName();
        //Debug.Log ("UserTeamFullName : " + mProfileEvent.Response.data.GetTeamFullName ());
        string imgName = UtilMgr.GetTeamEmblem(UserTeamCode);

        UserTeamCode = imgName;

        //Debug.Log ("UserMgr.UserInfo.teamCode be : " + UserMgr.UserInfo.GetTeamCode());
        LeftUserName.text                    = UserName;
        LeftTeamName.text                    = mProfileEvent.Response.data.GetTeamName();
        UserMgr.UserInfo.memberName          = UserName;
        UserMgr.UserInfo.memberEmail         = UserEmail;
        UserMgr.UserInfo.favoBB.teamCode     = mProfileEvent.Response.data.GetTeamCode();
        UserMgr.UserInfo.favoBB.teamFullName = mProfileEvent.Response.data.GetTeamFullName();
        UserMgr.UserInfo.favoBB.teamName     = mProfileEvent.Response.data.GetTeamName();
        //	Debug.Log ("mProfileEvent.Response.data.GetTeamCode(): " + mProfileEvent.Response.data.GetTeamCode());
        //	Debug.Log ("UserMgr.UserInfo.teamCode af: " + UserMgr.UserInfo.GetTeamCode());
        SetName     = UserName;
        SetTeamCode = mProfileEvent.Response.data.GetTeamCode();

        string images = Constants.IMAGE_SERVER_HOST + UserImagePath + UserImageName;

        //Profile.transform.FindChild ("LblNick").GetComponent<UILabel> ().text = UserName;
        //Profile.transform.FindChild ("LblStatus").GetComponent<UILabel> ().text = UserState;
        //Profile.transform.FindChild ("SprEmblem").GetComponent<UISprite> ().spriteName = UserTeamCode;
        if (UserImageName != "")
        {
            WWW www = new WWW(images);
            StartCoroutine(GetImage(www));
        }
        else if (UserImageName == UserEmail || UserImageName == "")
        {
            Profile.transform.FindChild("Panel").FindChild("Photo").GetComponent <UITexture> ().mainTexture = Default;
        }

        //if (UserImageName != "") {
        Profile.transform.FindChild("LblNick").GetComponent <UILabel> ().text          = UserName;
        Profile.transform.FindChild("LblStatus").GetComponent <UILabel> ().text        = UserState;
        Profile.transform.FindChild("SprEmblem").GetComponent <UISprite> ().spriteName = UserTeamCode;
        //}
    }
Esempio n. 8
0
    public void OnClose()
    {
        transform.FindChild("Body").FindChild("Changeables").FindChild("Analysis")
        .FindChild("Radar").FindChild("Canvas").gameObject.SetActive(false);
        mPlayerGraphData = null;
        mCardList        = null;
        IsCard           = false;
        IsPack           = false;
        IsFirstPack      = false;

        transform.GetComponent <PlayerCardAnimation>().AnimateDisappear();

        UtilMgr.RemoveBackState(UtilMgr.STATE.PlayerCard);
    }
Esempio n. 9
0
 public void DialogueClickHandler(DialogueMgr.BTNS btn)
 {
     if (mMustUpdate)
     {
         if (btn == DialogueMgr.BTNS.Btn1)
         {
             Debug.Log("Go to Store");
                             #if (UNITY_ANDROID)
             if (UtilMgr.IsMLB())
             {
                 Application.OpenURL(Constants.STORE_GOOGLE_MLB);
             }
             else
             {
                 Application.OpenURL(Constants.STORE_GOOGLE_KBO);
             }
                             #else
             Application.OpenURL(Constants.STORE_IPHONE);
                             #endif
         }
         else
         {
             UtilMgr.Quit();
         }
     }
     else
     {
         if (btn == DialogueMgr.BTNS.Btn1)
         {
             Debug.Log("Go to Store");
                             #if (UNITY_ANDROID)
             if (UtilMgr.IsMLB())
             {
                 Application.OpenURL(Constants.STORE_GOOGLE_MLB);
             }
             else
             {
                 Application.OpenURL(Constants.STORE_GOOGLE_KBO);
             }
                             #else
             Application.OpenURL(Constants.STORE_IPHONE);
                             #endif
         }
         else
         {
             CheckPreference();
         }
     }
 }
Esempio n. 10
0
    public string ToRequestString()
    {
//		string str = mParam + "key=" + Constants.NANOO_API_KEY;
//		string str = "key=" + Constants.NANOO_API_KEY;
//		string str = "http://partner.liveball.kr/comu/nanoo.php";
        string str = "";

        if (UtilMgr.IsTestServer())
        {
            if (mType == API_TYPE.EVENT)
            {
                str = Constants.TEST_EVENT_URL;
            }
            else
            {
                str = Constants.TEST_NOTICE_URL;
                if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    str += "/nanoo/2";
                }
                else
                {
                    str += "/nanoo/1";
                }
            }
        }
        else
        {
            if (mType == API_TYPE.EVENT)
            {
                str = Constants.EVENT_URL;
            }
            else
            {
                str = Constants.NOTICE_URL;
                if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    str += "/nanoo/2";
                }
                else
                {
                    str += "/nanoo/1";
                }
            }
        }


        return(str);
    }
    public void SetVSInfo(ScheduleInfo scheduleInfo)
    {
//		mSchedule = scheduleInfo;
//
//		mState = STATE.VS;
//
//		transform.FindChild("VSInfo").gameObject.SetActive(true);
//
//		transform.FindChild("GoldInfo").gameObject.SetActive(false);
//		transform.FindChild("GroupInfo").gameObject.SetActive(false);
//		transform.FindChild("CardInfo").gameObject.SetActive(false);
//
//		Transform tfInfo = transform.FindChild("VSInfo");
//		tfInfo.FindChild("SprTeamLogo").GetComponent<UISprite>().spriteName =
//			UtilMgr.GetTeamEmblem(scheduleInfo.extend[0].imageName);
//		tfInfo.FindChild("LblScoreLeft").GetComponent<UILabel>().text = scheduleInfo.extend[0].score+"";
//		tfInfo.FindChild("SprVSLogo").GetComponent<UISprite>().spriteName =
//			UtilMgr.GetTeamEmblem(scheduleInfo.extend[1].imageName);
//		tfInfo.FindChild("LblScoreRight").GetComponent<UILabel>().text = scheduleInfo.extend[1].score+"";
//
//
//
//
//		if(scheduleInfo.gameStatus == ScheduleInfo.GAME_ENDED)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrEnd;
//		else if(scheduleInfo.gameStatus == ScheduleInfo.GAME_PLAYING)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrLive;
//		else if(scheduleInfo.gameStatus == ScheduleInfo.GAME_READY)
//			tfInfo.FindChild("LblInfo").GetComponent<UILabel>().text = mStrReady;
//
//


        Transform tfInfo = Ground.transform;

        //	Debug.Log ();
        if (scheduleInfo != null)
        {
            tfInfo.FindChild("LeftTeam").GetComponent <UISprite> ().spriteName =
                UtilMgr.GetTeamEmblem(scheduleInfo.extend [0].imageName);
            tfInfo.FindChild("LeftTeam").FindChild("Label").GetComponent <UILabel> ().text = scheduleInfo.extend [0].teamName;
            //tfInfo.FindChild("LblScoreLeft").GetComponent<UILabel>().text = scheduleInfo.extend[0].score+"";
            tfInfo.FindChild("RightTeam").GetComponent <UISprite> ().spriteName =
                UtilMgr.GetTeamEmblem(scheduleInfo.extend [1].imageName);
            tfInfo.FindChild("RightTeam").FindChild("Label").GetComponent <UILabel> ().text = scheduleInfo.extend [1].teamName;
            //tfInfo.FindChild("LblScoreRight").GetComponent<UILabel>().text = scheduleInfo.extend[1].score+"";
            tfInfo.FindChild("Score").GetComponent <UILabel> ().text = scheduleInfo.extend [0].score + ":" + scheduleInfo.extend [1].score;
        }
    }
Esempio n. 12
0
    void ReceivedLineup()
    {
        transform.FindChild("Top").FindChild("LblMyLineup").GetComponent <UILabel>().text
            = UtilMgr.GetLocalText("LblMyLineup") + " [00a0e9][" + mLineupEvent.Response.data.Count + "/50]";

        UtilMgr.ClearList(transform.FindChild("Body").FindChild("Draggable"));
        transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>()
        .Init(mLineupEvent.Response.data.Count, delegate(UIListItem item, int index) {
            InitItem(item, index);
        });
        transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition();

        UtilMgr.AddBackState(UtilMgr.STATE.Lineup);
        UtilMgr.AnimatePageToLeft("RegisterEntry", "Lineup");
    }
Esempio n. 13
0
    IEnumerator Next()
    {
        transform.FindChild("Top").gameObject.SetActive(false);
        transform.FindChild("Body").gameObject.SetActive(false);
        yield return(new WaitForSeconds(0.1f));

        transform.FindChild("Top").gameObject.SetActive(true);
        transform.FindChild("Body").gameObject.SetActive(true);
        UtilMgr.AddBackState(UtilMgr.STATE.LiveBingo);
        UtilMgr.AnimatePageToLeft("Lobby", "LiveBingo");

//		if(UserMgr.eventJoined.status.Equals("Final")){
//			ShowGameEnded();
//		}
    }
Esempio n. 14
0
    void ReceivedChecking()
    {
        if (mCheckEvent.Response.code == 0)
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrCheckNick"), UtilMgr.GetLocalText("StrNickDuplicated"),
                                     DialogueMgr.DIALOGUE_TYPE.Alert, null);
            return;
        }

        mUpdateEvent = new UpdateMemberInfoEvent(new EventDelegate(ReceivedUpdate));
        JoinMemberInfo memInfo = new JoinMemberInfo();

        memInfo.MemberName = mNick;
        NetMgr.UpdateMemberInfo(memInfo, mUpdateEvent, false, true);
    }
Esempio n. 15
0
    public void OnBackPressed()
    {
        Debug.Log("DialogueMgr.IsShown : " + DialogueMgr.IsShown);
        if (DialogueMgr.IsShown)
        {
            DialogueMgr.DismissDialogue();
        }
        else
        {
            UtilMgr.OnBackPressed();
        }
//		if (!UtilMgr.OnBackPressed ()) {
//			UtilMgr.SetBackEvent (new EventDelegate (this, "DismissDialogue"));
//		}
    }
 void ReceivedNick()
 {
     if (mNickEvent.Response.code == 0)
     {
         DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrCheckNick"), UtilMgr.GetLocalText("StrNickDuplicated"),
                                  DialogueMgr.DIALOGUE_TYPE.Alert, null);
     }
     else
     {
         DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrCheckNick"), UtilMgr.GetLocalText("StrNickConfirmed"),
                                  DialogueMgr.DIALOGUE_TYPE.Alert, JoinComplete);
         transform.root.GetComponent <LoginRoot>().SetNick(
             transform.parent.FindChild("Input").FindChild("Label").GetComponent <UILabel>().text);
     }
 }
Esempio n. 17
0
    void ReceivedEntry()
    {
        if (mRegEvent.Response.code == 0)
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrRegSucceed"),
                                     UtilMgr.GetLocalText("StrRegSucceed2"), DialogueMgr.DIALOGUE_TYPE.Alert, RegComplete);

            UserMgr.UserInfo.ticket -= transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mContestInfo.entryTicket;
        }
        else
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrError"),
                                     mRegEvent.Response.message, DialogueMgr.DIALOGUE_TYPE.Alert, RegComplete);
        }
    }
Esempio n. 18
0
    void OpenTerms(bool isGuest)
    {
        UtilMgr.AddBackEvent(new EventDelegate(this, "Init"));
        transform.FindChild("ContainerBtns").gameObject.SetActive(false);
        transform.FindChild("SprLogo").gameObject.SetActive(false);
        transform.FindChild("FormJoin").gameObject.SetActive(false);
        transform.FindChild("FormJoin2").gameObject.SetActive(false);
        transform.FindChild("SelectTeam").gameObject.SetActive(false);
        transform.FindChild("Certification").gameObject.SetActive(false);
        transform.FindChild("SprLogo").gameObject.SetActive(false);
        transform.FindChild("WindowEmail").gameObject.SetActive(false);

        transform.FindChild("Terms").gameObject.SetActive(true);
        transform.FindChild("Terms").GetComponent <ScriptTerms>().Init(isGuest);
    }
Esempio n. 19
0
    // Use this for initialization
    void Start()
    {
        Texture2D texture = null;

        if (UtilMgr.IsMLB())
        {
            texture = Resources.Load <Texture2D>("images/rt_bingo_comingsoon");
        }
        else
        {
            texture = Resources.Load <Texture2D>("images/rt_bingo_comingsoon_k");
        }

        transform.FindChild("Body").FindChild("Scroll View").GetChild(0).GetComponent <UITexture>().mainTexture = texture;
    }
Esempio n. 20
0
    void SetTilePlayer()
    {
        transform.FindChild("Player").gameObject.SetActive(true);
        transform.FindChild("Team").gameObject.SetActive(false);

        transform.FindChild("Player").FindChild("LblName").GetComponent <UILabel>().text
            = Localization.language.Equals("English") ? mBingoBoard.playerName : mBingoBoard.playerKorName;
        transform.FindChild("Player").FindChild("LblName").GetComponent <UILabel>().color = new Color(51f / 255f, 51f / 255f, 51f / 255f);

        transform.FindChild("Player").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().width  = 72;
        transform.FindChild("Player").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>().height = 90;
        UtilMgr.LoadImage(mBingoBoard.playerId,
                          transform.FindChild("Player").FindChild("Panel").FindChild("Texture").GetComponent <UITexture>());
        transform.FindChild("Team").FindChild("LblGuess").gameObject.SetActive(true);
    }
Esempio n. 21
0
 void DialogPower(DialogueMgr.BTNS btn)
 {
     if (btn == DialogueMgr.BTNS.Btn1)
     {
         if (UserMgr.UserInfo.gold < mBingoResponse.data.bingo.powerTimePrice)
         {
             DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPowerChance1"), UtilMgr.GetLocalText("StrNotEnoughGold2")
                                      , DialogueMgr.DIALOGUE_TYPE.Alert, null);
         }
         else
         {
             mPowerEvent = new CallBingoEvent(ReceivedPower);
             NetMgr.PowerMax(UserMgr.eventJoined.gameId, mBingoResponse.data.bingo.bingoId, mPowerEvent);
         }
     }
 }
Esempio n. 22
0
    public void BackPressed()
    {
        UtilMgr.RemoveAllBackEvents();

        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Highlight").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Lineup").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Items").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Livetalk").gameObject));
        //			if(UiRoot.transform.FindChild("TF_Highlight").transform.localPosition.y==25){
        //			StartCoroutine(Down(UiRoot.transform.FindChild("TF_Highlight").gameObject));
        //			}else if(UiRoot.transform.FindChild("TF_Lineup").transform.localPosition.y==25){
        //				StartCoroutine(Down(UiRoot.transform.FindChild("TF_Lineup").gameObject));
        //			}else if(UiRoot.transform.FindChild("TF_Livetalk").transform.localPosition.y==25){
        //				StartCoroutine(Down(UiRoot.transform.FindChild("TF_Livetalk").gameObject));
        //			}
    }
Esempio n. 23
0
    public void Reset()
    {
        transform.FindChild("Body").FindChild("Scroll View").FindChild("User").FindChild("LblName")
        .GetComponent <UILabel>().text = UserMgr.UserInfo.nick;
        int width = transform.FindChild("Body").FindChild("Scroll View").FindChild("User").FindChild("LblName")
                    .GetComponent <UILabel>().width;

        transform.FindChild("Body").FindChild("Scroll View").FindChild("User").FindChild("LblName")
        .FindChild("BtnEdit").localPosition = new Vector3(width + 40, 0);
        transform.FindChild("Body").FindChild("Rename").gameObject.SetActive(false);
        transform.FindChild("Body").FindChild("Rename").FindChild("Box").FindChild("Input")
        .GetComponent <UIInput>().value = UserMgr.UserInfo.nick;
        UtilMgr.LoadUserImage(UserMgr.UserInfo.photoUrl,
                              transform.FindChild("Body").FindChild("Scroll View").FindChild("User").FindChild("Photo")
                              .FindChild("Panel").FindChild("Texture").GetComponent <UITexture>());
    }
Esempio n. 24
0
    // Use this for initialization
    void Start()
    {
//		mSchedule.SetActive (true);
//
//		mRanking.SetActive (false);
//		mLeague.SetActive (false);
//		mStatistics.SetActive (false);
        //mScheduleEvent = new GetScheduleEvent (new EventDelegate ("OpenSchedule"));
        //NetMgr.GetScheduleAll (mScheduleEvent);

//		OpenSchedule ();
        CheckFirst();

        mEmblem.GetComponent <UISprite>().spriteName =
            UtilMgr.GetTeamEmblem(UserMgr.UserInfo.GetTeamCode());
    }
    void InitPrizes()
    {
        Transform tf = transform.FindChild("Changeables").FindChild("Prizes");

        tf.gameObject.SetActive(true);
        UtilMgr.ClearList(tf.FindChild("Draggable"));

        tf.FindChild("Draggable").GetComponent <UIDraggablePanel2>().Init(
            mRewardEvent.Response.data.Count, delegate(UIListItem item, int index) {
            item.Target.transform.FindChild("LblLeft").GetComponent <UILabel>().text
                = mRewardEvent.Response.data[index].rank
                  + UtilMgr.GetOrderString(mRewardEvent.Response.data[index].rank);
            item.Target.transform.FindChild("LblRight").GetComponent <UILabel>().text
                = mRewardEvent.Response.data[index].gold + "G";
        });
    }
Esempio n. 26
0
    void SetTileTeam()
    {
        transform.FindChild("Player").gameObject.SetActive(false);
        transform.FindChild("Team").gameObject.SetActive(true);

        if (!UtilMgr.IsMLB())
        {
            transform.FindChild("Team").FindChild("SprEmblem").GetComponent <UISprite>().width  = 74;
            transform.FindChild("Team").FindChild("SprEmblem").GetComponent <UISprite>().height = 60;
        }
        transform.FindChild("Team").FindChild("SprEmblem").GetComponent <UISprite>().spriteName = mBingoBoard.teamId + "";
        transform.FindChild("Team").FindChild("LblName").GetComponent <UILabel>().text
            = Localization.language.Equals("English") ? mBingoBoard.teamName : mBingoBoard.teamKorName;
        transform.FindChild("Team").FindChild("LblGuess").GetComponent <UILabel>().text
            = Localization.language.Equals("English") ? mBingoBoard.quizCondition : mBingoBoard.quizConditionKor;
    }
Esempio n. 27
0
    void purchaseSucceededEvent(GooglePurchase purchase)
    {
        UtilMgr.DismissLoading();
        mIAPEvent = new InAppPurchaseEvent(FinishIAP);

        byte[] bytes     = System.Text.Encoding.UTF8.GetBytes(purchase.originalJson);
        string basedJson = System.Convert.ToBase64String(bytes);

        bytes = System.Text.Encoding.UTF8.GetBytes(purchase.signature);
        string basedSign = System.Convert.ToBase64String(bytes);

//		NetMgr.InAppPurchase(false, purchase.productId, basedJson, basedSign, mIAPEvent);
        NetMgr.InAppPurchase(false, purchase.productId, basedSign, basedJson, mIAPEvent);

        Debug.Log("purchaseSucceededEvent: " + purchase);
    }
Esempio n. 28
0
    public void GotCardInven()
    {
        Debug.Log("GotCardInven");
        UserMgr.CardInvenInfo = mCardEvent.Response.data;

        UtilMgr.RemoveAllBackEvents();
        //        AutoFade.LoadLevel ("SceneTeamHome", 0f, 1f);
        try{
            ContestEvent = new ContestListEvent(new EventDelegate(this, "GetContest"));
            NetMgr.GetContestList(ContestEvent);
        }catch {
            HistoryEvent = new HistoryListEvent(new EventDelegate(this, "GetHistory"));
            NetMgr.GetHistoryList(HistoryEvent);
        }
        //    GetContest ();
    }
Esempio n. 29
0
    public void Init()
    {
        transform.localPosition = new Vector3(2000f, 0);
        transform.gameObject.SetActive(true);

        Reset();

        transform.FindChild("Body").FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition();


        UtilMgr.RemoveBackState(UtilMgr.STATE.Profile);
        UtilMgr.AnimatePageToLeft(UtilMgr.GetLastBackState().ToString(), "Settings");
        UtilMgr.AddBackState(UtilMgr.STATE.Settings);

//		UtilMgr.AnimatePageToLeft(UtilMgr.
    }
Esempio n. 30
0
    IEnumerator webCSAPIProcess(WWW www, BaseCSEvent baseEvent, bool showLoading)
    {
        if (www == null)
        {
            Debug.Log("www is null");
            yield break;
        }

        float timeSum = 0f;

        if (showLoading)
        {
            UtilMgr.ShowLoading(showLoading);
        }

        while (!www.isDone &&
               string.IsNullOrEmpty(www.error) &&
               timeSum < TIMEOUT)
        {
            timeSum += Time.deltaTime;
            yield return(0);
        }


        if (www.error == null && www.isDone)
        {
            Debug.Log(www.text);

            if (baseEvent != null)
            {
                baseEvent.Init(www.text);
            }
        }
        else
        {
            Debug.Log(www.error);
            //            //            DialogueMgr.ShowDialogue("네트워크오류", "네트워크 연결이 불안정합니다.\n인터넷 연결을 확인 후 다시 시도해주세요.", DialogueMgr.DIALOGUE_TYPE.Alert, null);
            //            DialogueMgr.ShowDialogue("네트워크오류", "네트워크 연결이 불안정합니다.\n인터넷 연결을 확인 후 다시 시도해주세요.",
            //                                     DialogueMgr.DIALOGUE_TYPE.YesNo, "재시도", "", "타이틀로 가기", ConnectHandlerForHttp);
            //            mWWW = www;
            //            mBaseEvent = baseEvent;
            //            mIsUpload = isUpload;
            //            mIsLoading = showLoading;
        }

        UtilMgr.DismissLoading();
    }
Esempio n. 31
0
 public void Init(UtilMgr.STATE state)
 {
     mState = state;
     Init ();
 }