void CheckAttendance() { WWW www = new WWW(Constants.URL_ATTENDANCE + UserMgr.UserInfo.memSeq); StartCoroutine(RunAttendance(www)); UtilMgr.ShowLoading(true); }
/**캐쉬 결제 요청 (마켓 결제창 띄움)*/ public void RequestIAP(string itemcode, string itemname) { UtilMgr.ShowLoading(); mItemname = itemname; mItemcode = itemcode; StartCoroutine(WaitingForPurchase()); }
IEnumerator WaitingToken() { UtilMgr.ShowLoading(true); yield return(new WaitForSeconds(3f)); Debug.Log("Skip Token"); IOSMgr.SkipToken(); }
void CheckAttendance() { WWW www = new WWW(Constants.EXT_SERVER_HOST + Constants.URL_ATTENDANCE + UserMgr.UserInfo.memSeq); // Debug.Log ("Constants.URL_ATTENDANCE+UserMgr.UserInfo.memSeq : " + Constants.URL_ATTENDANCE+UserMgr.UserInfo.memSeq); StartCoroutine(RunAttendance(www)); UtilMgr.ShowLoading(true); }
void OnLoadBegin(UniWebView webView, string loadingUrl) { Debug.Log("OnLoadBegin : " + loadingUrl); if (!loadingUrl.Equals(LOVE_URL)) { mBtnBack.SetActive(true); } else { mBtnBack.SetActive(false); } UtilMgr.ShowLoading(true); }
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(); }
// void RetryIAP(){ // orderNo = RequestIAP.Response.data.orderNo; // purchaseSucceededEvent(mPurchase); // } void mRequestIAP() { #if (UNITY_ANDROID) UtilMgr.ShowLoading(); //if (RequestIAP.Response.data != null) { //if(RequestIAP.Response.data.productId==itemid&&RequestIAP.Response.data.productCode==itemcode){ // orderNo = RequestIAP.Response.data.orderNo; //RequestIAP.Response.data. // GoogleIAB.init(Constants.GOOGLE_PUBLIC_KEY); GoogleIAB.purchaseProduct(itemcode); //, RequestIAP.Response.data.purchaseKey ); //} //} #else // orderNo = RequestIAP.Response.data.orderNo; IOSMgr.BuyItem(itemcode); #endif }
IEnumerator webAPIProcess(WWW www, BaseEvent baseEvent) { UtilMgr.ShowLoading (true); yield return www; if(www.error == null) { Debug.Log(www.text); // CommonDialogue.Show (www.text); baseEvent.Init(www.text); } else { Debug.Log(www.error); } UtilMgr.DismissLoading (); }
void OnLoadBegin(UniWebView webView, string loadingUrl) { Debug.Log("OnLoadBegin : " + loadingUrl); if (loadingUrl.Contains("liveball/board?cd=")) //in board { mBtnMenu.SetActive(true); mBtnNotice.SetActive(true); mBtnAccusation.SetActive(false); mBtnBack.SetActive(false); int startNum = loadingUrl.IndexOf("/board?") + 10; mBoardNum = loadingUrl.Substring(startNum); Debug.Log("mBoardNum : " + mBoardNum); } else if (loadingUrl.Contains("liveball/board/")) //in content // Debug.Log("index : " + loadingUrl.IndexOf("/board/")); // switch menu btn to back btn { mBtnBack.SetActive(true); mBtnAccusation.SetActive(true); mBtnMenu.SetActive(false); mBtnNotice.SetActive(false); // show accusation btn int startNum = loadingUrl.IndexOf("/board/") + 7; int endNum = loadingUrl.IndexOf("?cd="); mContentNum = loadingUrl.Substring(startNum, endNum - startNum); Debug.Log("mContentNum : " + mContentNum); } else { //turn off accusation mBtnBack.SetActive(true); mBtnNotice.SetActive(false); mBtnMenu.SetActive(false); mBtnAccusation.SetActive(false); } UtilMgr.ShowLoading(true); }
void OnLoadBegin(UniWebView webView, string loadingUrl) { if (loadingUrl.Equals("http://liveball.friize.com/webview/close")) { string value = PlayerPrefs.GetString(Constants.PrefNotice); webView.Stop(); // webView.Hide(); if (value != null && value.Equals(UtilMgr.GetDateTime("yyyyMMdd"))) { AutoFade.LoadLevel("SceneLobby"); } else { AutoFade.LoadLevel("SceneNotice"); } } UtilMgr.ShowLoading(true); }
void Start() { UtilMgr.ShowLoading(true); SetDelegates(); #if (UNITY_ANDROID) #else #endif transform.FindChild("category 1").gameObject.SetActive(true); origin1 = transform.FindChild("category 1").GetChild(0).FindChild("origin").gameObject; imageC1 = transform.FindChild("category 1").GetChild(0).FindChild("C").gameObject; imageC2 = transform.FindChild("category 1").GetChild(0).FindChild("C2").gameObject; originV1 = new Vector3(origin1.transform.localPosition.x, 235, origin1.transform.localPosition.z); origin1.gameObject.SetActive(false); getruby = new GetItemShopRubyEvent(new EventDelegate(this, "ruby")); NetMgr.GetItemShopRubyList(getruby); // transform.FindChild ("category 2").gameObject.SetActive (true); // origin2 = transform.FindChild("category 2").GetChild(0).FindChild("origin").gameObject; // // originV2 = new Vector3(origin2.transform.localPosition.x,235,origin2.transform.localPosition.z); // origin2.gameObject.SetActive (false); // getgold = new GetItemShopGoldEvent (new EventDelegate (this, "gold")); // NetMgr.GetItemShopGoldList (getgold); transform.FindChild("category 3").gameObject.SetActive(true); origin3 = transform.FindChild("category 3").GetChild(0).FindChild("origin").gameObject; originV3 = new Vector3(origin3.transform.localPosition.x, 235, origin3.transform.localPosition.z); origin3.gameObject.SetActive(false); getitem = new GetItemShopItemEvent(new EventDelegate(this, "item")); NetMgr.GetItemShopItemList(getitem); //getcard = new GetCardInvenEvent (new EventDelegate (this, "card")); //NetMgr.GetCardInven (getcard); }
public void Randomize() { UtilMgr.ShowLoading(); StartCoroutine(EnumRand()); }
protected void OnLoadBegin(UniWebView webView, string loadingUrl) { Debug.Log("OnLoadBegin : " + loadingUrl); if (loadingUrl.Contains("youtube.com/embed") || loadingUrl.Contains("about:blank")) { } else if (loadingUrl.Contains("liveball/board?cd=") || loadingUrl.Equals("https://game.nanoo.so/liveball/board")) //in board { if (mBtnMenu != null) { mBtnMenu.SetActive(true); } mBtnNotice.SetActive(true); mBtnAccusation.SetActive(false); mBtnBack.SetActive(false); try{ if (loadingUrl.Equals("https://game.nanoo.so/liveball/board")) { mBoardNum = "0"; } else { int startNum = loadingUrl.IndexOf("/board?") + 10; mBoardNum = loadingUrl.Substring(startNum); } } catch { mBoardNum = "0"; } Debug.Log("mBoardNum : " + mBoardNum); } else if (loadingUrl.Contains("liveball/board/")) //in content // Debug.Log("index : " + loadingUrl.IndexOf("/board/")); // switch menu btn to back btn { mBtnBack.SetActive(true); mBtnAccusation.SetActive(true); if (mBtnMenu != null) { mBtnMenu.SetActive(false); } mBtnNotice.SetActive(false); // show accusation btn try{ int startNum = loadingUrl.IndexOf("/board/") + 7; if (loadingUrl.Contains("?cd=")) { int endNum = loadingUrl.IndexOf("?cd="); mContentNum = loadingUrl.Substring(startNum, endNum - startNum); } else { mContentNum = loadingUrl.Substring(startNum); } } catch { mContentNum = "0"; } Debug.Log("mContentNum : " + mContentNum); } else { //turn off accusation mBtnBack.SetActive(true); mBtnNotice.SetActive(true); if (mBtnMenu != null) { mBtnMenu.SetActive(false); } mBtnAccusation.SetActive(false); } UtilMgr.ShowLoading(true); }
// void CardPurchasedHandler(DialogueMgr.BTNS btn){ // mCardEvent = new GetCardInvenEvent(ReceivedCards); // NetMgr.GetCardInven(mCardEvent); // } void ReceivedCards() { UtilMgr.ShowLoading(); StartCoroutine(WaitingForAnimation()); }
IEnumerator webAPIProcess(WWW www, BaseEvent baseEvent, bool showLoading, bool isUpload) { if (www == null) { Debug.Log("www is null"); yield break; } if (www.error != null) { Debug.Log("www.error : " + www.error.ToString()); } float timeSum = 0f; if (isUpload) { UtilMgr.ShowLoading(true, www); yield return(www); } else { if (showLoading) { UtilMgr.ShowLoading(showLoading); } while (!www.isDone && string.IsNullOrEmpty(www.error) && timeSum < TIMEOUT) { timeSum += Time.deltaTime; yield return(0); } } //Debug.Log("www.text : " + www.url); ; if (www.error == null && www.isDone) { Debug.Log(www.text); // CommonDialogue.Show (www.text); if (baseEvent != null) { Debug.Log("baseEvent != null"); baseEvent.Init(www.text); } } else { Debug.Log(www.error); // DialogueMgr.ShowDialogue("네트워크오류", "네트워크 연결이 불안정합니다.\n인터넷 연결을 확인 후 다시 시도해주세요.", DialogueMgr.DIALOGUE_TYPE.Alert, null); if (Application.loadedLevelName.Equals("SceneLogin")) { DialogueMgr.ShowDialogue("네트워크오류", "네트워크 연결이 불안정합니다.\n인터넷 연결을 확인 후 다시 시도해주세요.", DialogueMgr.DIALOGUE_TYPE.YesNo, "재시도", "", "게임 종료", ConnectHandlerForHttp); } else { DialogueMgr.ShowDialogue("네트워크오류", "네트워크 연결이 불안정합니다.\n인터넷 연결을 확인 후 다시 시도해주세요.", DialogueMgr.DIALOGUE_TYPE.YesNo, "재시도", "", "타이틀로 가기", ConnectHandlerForHttp); } Debug.Log(www.text); mWWW = www; mBaseEvent = baseEvent; mIsUpload = isUpload; mIsLoading = showLoading; } UtilMgr.DismissLoading(); }
void OnLoadBegin(UniWebView webView, string loadingUrl) { UtilMgr.ShowLoading(true); }
IEnumerator webAPIProcess(WWW www, BaseEvent baseEvent, bool showLoading, bool isUpload) { if (www == null) { Debug.Log("www is null"); yield break; } if (www.error != null) { Debug.Log("www.error : " + www.error.ToString()); } float timeSum = 0f; if (isUpload) { UtilMgr.ShowLoading(true, www); yield return(www); } else { if (showLoading) { UtilMgr.ShowLoading(showLoading); } while (!www.isDone && string.IsNullOrEmpty(www.error) && timeSum < TIMEOUT) { timeSum += Time.deltaTime; yield return(0); } } //Debug.Log("www.text : " + www.url); UtilMgr.DismissLoading(); if (www.error == null && www.isDone) { Debug.Log(www.text); mRetryCnt = 0; // CommonDialogue.Show (www.text); if (baseEvent != null) { Debug.Log("baseEvent != null"); baseEvent.Init(www.text); } } else { Debug.Log(www.error); mWWW = www; mBaseEvent = baseEvent; mIsUpload = isUpload; mIsLoading = showLoading; if (mRetryCnt < 10) { mRetryCnt++; ConnectHandlerForHttp(DialogueMgr.BTNS.Btn1); } else { mRetryCnt = 0; if (Application.loadedLevelName.Equals("Login")) { DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrNetworkError"), UtilMgr.GetLocalText("StrNetworkError1"), DialogueMgr.DIALOGUE_TYPE.YesNo, UtilMgr.GetLocalText("StrRetry"), "", UtilMgr.GetLocalText("StrExit"), ConnectHandlerForHttp); } else { DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrNetworkError"), UtilMgr.GetLocalText("StrNetworkError1"), DialogueMgr.DIALOGUE_TYPE.YesNo, UtilMgr.GetLocalText("StrRetry"), "", UtilMgr.GetLocalText("StrGotoTitle"), ConnectHandlerForHttp); } } } }