void purchaseSucceededEvent(string receipt) { UtilMgr.DismissLoading(); byte[] bytes = System.Text.Encoding.UTF8.GetBytes(receipt); mIAPEvent = new InAppPurchaseEvent(FinishIAP); NetMgr.InAppPurchase(false, mItemcode, System.Convert.ToBase64String(bytes), "", mIAPEvent); }
public void InitQuizFirst() { if (mEventProgQuiz.Response.data != null) { if (mEventProgQuiz.Response.data.quiz.Count > 0) { UtilMgr.gameround = ((mEventProgQuiz.Response.data.quiz [0].gameRound) * 2) + (mEventProgQuiz.Response.data.quiz [0].inningType - 1); Debug.Log("InitQuizFirst"); Debug.Log("mEventProgQuiz.Response.data.quiz[0] : " + mEventProgQuiz.Response.data.quiz[0].playerName); transform.parent.parent.FindChild("GameObject").FindChild("TF_Landing").GetComponent <LandingManager>(). SetHitter(mEventProgQuiz.Response.data); if (ScriptMainTop.LandingState == 2 || ScriptMainTop.LandingState == 3) { // string TeamColor = mEventProgQuiz.Response.data.team[1].teamColor; // TeamColor = TeamColor.Replace("#",""); // LandingManager.TeamColor = TeamColor; // transform.parent.parent.FindChild("GameObject").FindChild("TF_Landing").GetComponent<LandingManager>(). // // SetTeamColor(TeamColor); } } } UtilMgr.DismissLoading(); QuizMgr.SetQuizList(mEventProgQuiz.Response.data.quiz); ResetList(); mFirstLoading = false; }
void GotSchedule() { UtilMgr.DismissLoading(); mScheduleList = mScheduleEvent.Response.data; for (int i = 0; i < mScheduleList.Count; i++) { Debug.Log("for : " + i); GameObject obj = Instantiate(mListMatchItem, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject; obj.transform.parent = mListMatch.transform.FindChild("Grid").transform; obj.transform.localScale = new Vector3(1f, 1f, 1f); ScriptMatchItem sItem = obj.GetComponent <ScriptMatchItem> (); mListScriptMatchItem.Add(sItem); sItem.Init(mScheduleList[i], i); if (mScheduleList.Count == 1) { sItem.DeactiveAllBtns(); } else if (i == 0) { sItem.DeactiveLeftBtn(); } else if (i == mScheduleList.Count - 1) { sItem.DeactiveRightBtn(); } } mListMatch.transform.FindChild("Grid").GetComponent <UIGrid>().Reposition(); }
IEnumerator RunAttendance(WWW www) { yield return(www); UtilMgr.DismissLoading(); if (www.error != null) { DialogueMgr.ShowDialogue("attendance error", www.error, DialogueMgr.DIALOGUE_TYPE.Alert, null); } else { Debug.Log("www : " + www.text); if (www.text != null && www.text.Length > 0) { // mWebview.SetActive(true); // mWebview.GetComponent<ScriptGameWebview>().GoTo(www.text); DailyReward dReward = Newtonsoft.Json.JsonConvert.DeserializeObject <DailyReward>(www.text); if (dReward.result == 200) { DialogueMgr.ShowDialogue("접속보상", dReward.message, DialogueMgr.DIALOGUE_TYPE.Alert, null); Debug.Log("add"); if (Application.loadedLevelName.Equals("SceneMain")) { Debug.Log("add Main"); transform.root.FindChild("GameObject").FindChild("Top").FindChild("Panel").FindChild("BtnPost").GetComponent <PostButton>().YellowOn(); } } } else { // Debug.Log("Attendance is already done"); } } }
public void mDoneIAP() { UtilMgr.DismissLoading(); DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"), string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemname), DialogueMgr.DIALOGUE_TYPE.Alert, null); Debug.Log("All PurchaseSucceeded"); }
void OnApplicationPause(bool pause) { UtilMgr.OnPause = pause; // Debug.Log("Application pause : "+pause); if (!pause) { UtilMgr.DismissLoading(); } }
IEnumerator RunAttendance(WWW www) { yield return(www); UtilMgr.DismissLoading(); if (www.error != null) { DialogueMgr.ShowDialogue("attendance error", www.error, DialogueMgr.DIALOGUE_TYPE.Alert, null); } else { Debug.Log("Attendance : " + www.text); if (www.text != null && www.text.Length > 0) { // mWebview.SetActive(true); // mWebview.GetComponent<ScriptGameWebview>().GoTo(www.text); DailyReward dReward = Newtonsoft.Json.JsonConvert.DeserializeObject <DailyReward>(www.text); if (dReward.result == 200) { DialogueMgr.ShowDialogue("접속보상", dReward.message, DialogueMgr.DIALOGUE_TYPE.Alert, CheckRecent); Debug.Log("add"); if (Application.loadedLevelName.Equals("SceneMain 1")) { Debug.Log("add Main"); transform.root.FindChild("GameObject").FindChild("Top").FindChild("Panel").FindChild("BtnPost").GetComponent <PostButton>().YellowOn(); } } else { CheckRecentMaessga(); } if (dReward.legend != null && dReward.legend.Length > 0) { //show n link url UserMgr.legend = dReward.legend; } else { //unshow // transform.root.FindChild("Scroll").FindChild("Main").FindChild("Nomal Contest") // .FindChild("EventPanel").gameObject.SetActive(false); // transform.root.FindChild("Scroll").FindChild("Main").FindChild("Nomal Contest").FindChild("Scroll View2") // .GetComponent<UIPanel>().SetRect(720f,1038f); // transform.root.FindChild("Scroll").FindChild("Main").FindChild("Nomal Contest").FindChild("Scroll View2") // .localPosition += new Vector3(0,75f,0); // transform.root.FindChild("Scroll").FindChild("Main").FindChild("Nomal Contest").FindChild("Scroll View2") // .GetComponent<UIDraggablePanel2>().ResetPosition(); } } else { // Debug.Log("Attendance is already done"); } } }
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); }
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 OnLoadComplete(UniWebView webView, bool success, string errorMessage) { Debug.Log("OnLoadComplete"); UtilMgr.DismissLoading(); if (success) { // webView.Show(); mStateWebview = STATE_WEBVIEW.VISIBLE; } // UniWebViewEdgeInsets insets = new UniWebViewEdgeInsets (100, 0, 1130, 720);//top, left, btm, right // webView.insets = insets; // Debug.Log ("insets top : " + webView.insets.top); }
void LoginComplete() { UtilMgr.DismissLoading(); if (mLoginEvent.Response.code > 0) { Debug.Log("error : " + mLoginEvent.Response.message); if (mLoginEvent.Response.code == 100) { LoginFailed(); } UtilMgr.DismissLoading(); return; } mLoginInfo = mLoginEvent.Response.data; mProfileEvent = new GetProfileEvent(new EventDelegate(this, "GotProfile")); NetMgr.GetProfile(mLoginInfo.memSeq, mProfileEvent); }
void SetBanner() { if (UserMgr.UserInfo.ppCount > 0) { temp1 = (GameObject)Instantiate(imageC1, new Vector3(0, 0, 0), origin1.transform.localRotation); } else { temp1 = (GameObject)Instantiate(imageC2, new Vector3(0, 0, 0), origin1.transform.localRotation); } UtilMgr.DismissLoading(); temp1 = (GameObject)Instantiate(imageC2, new Vector3(0, 0, 0), origin1.transform.localRotation); temp1.transform.parent = origin1.transform.parent; temp1.transform.localScale = new Vector3(1, 1, 1); temp1.transform.localPosition = new Vector3(originV1.x, originV1.y - ((0) * gap), originV1.z); temp1.gameObject.SetActive(true); }
// public void GuestCompelte(){ // Login (mLoginEvent.Response.data.memberEmail, mLoginEvent.Response.data.memberPwd); // } public void SetGCMId() { UtilMgr.DismissLoading(); #if (UNITY_EDITOR) mLoginInfo.memUID = AndroidMgr.GetMsg(); mLoginInfo.DeviceID = SystemInfo.deviceUniqueIdentifier; DoLogin(); #elif (UNITY_ANDROID) mLoginInfo.memUID = AndroidMgr.GetMsg(); mLoginInfo.DeviceID = SystemInfo.deviceUniqueIdentifier; DoLogin(); #else StopCoroutine(WaitingToken()); mLoginInfo.memUID = IOSMgr.GetMsg(); EventDelegate eventd = new EventDelegate(this, "DoLogin"); IOSMgr.GetUID("", eventd); #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 (); }
public void FinishIAP() { UtilMgr.DismissLoading(); if (mIAPEvent.Response.code == 0) { #if (UNITY_ANDROID) GoogleIAB.consumeProduct(mItemcode); #else mDoneIAP(); #endif // mDoneIAP(); } else { //failed DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseFailed"), string.Format(UtilMgr.GetLocalText("StrPurchaseFailed2"), mItemname), DialogueMgr.DIALOGUE_TYPE.Alert, null); } }
IEnumerator RunAttendance(WWW www) { yield return(www); UtilMgr.DismissLoading(); if (www.error != null) { DialogueMgr.ShowDialogue("attendance error", www.error, DialogueMgr.DIALOGUE_TYPE.Alert, null); } else { if (www.text != null && www.text.Length > 0) { //popup webview mWebview.SetActive(true); mWebview.GetComponent <ScriptGameWebview>().GoTo(www.text); } else { Debug.Log("Attendance is already done"); } } }
void LoginComplete() { UtilMgr.DismissLoading(); if (mLoginEvent.Response.code > 0) { Debug.Log("error : " + mLoginEvent.Response.message); // if(mLoginEvent.Response.code == 100){ LoginFailed(); // } // UtilMgr.DismissLoading (); return; } mLoginInfo = mLoginEvent.Response.data; // Debug.Log("query id is " + mLoginEvent.Response.query_id); // if(mLoginEvent.Response.query_id.Equals("tubyLoginDeviceID")){ // PlayerPrefs.SetString(Constants.PrefGuest, "1"); // } PlayerPrefs.SetString(Constants.PrefNick, mLoginInfo.memberName); EventDelegate eventd = new EventDelegate(this, "Getdata"); NetMgr.GetGift(eventd); }
IEnumerator EnumRand() { yield return(null); bool incorrect = true; for (int i = 0; i < 9; i++) { incorrect = true; do { transform.root.FindChild("SelectPlayer").GetComponent <SelectPlayer>().mSelectedNo = (i + 1); int rand = UnityEngine.Random.Range(0, UserMgr.PlayerList.Count - 1); if (UserMgr.PlayerList[rand].positionNo == (i + 1)) { SetDesignated(UserMgr.PlayerList[rand]); incorrect = false; } }while(incorrect); } UtilMgr.DismissLoading(); }
IEnumerator WaitingForAnimation() { yield return(new WaitForSeconds(0.5f)); UserMgr.CardList = mCardEvent.Response.data; transform.root.FindChild("MyCards").localPosition = new Vector3(2000f, 0, 0); transform.root.FindChild("MyCards").GetComponent <MyCards>().Init(mCardEvent, transform.root.FindChild("MyCards").GetComponent <MyCards>().GetMailEvent()); List <CardInfo> cardList = new List <CardInfo>(); foreach (CardInfo info in mGoldEvent.Response.data.item) { foreach (CardInfo tmp in UserMgr.CardList) { if (info.itemSeq == tmp.itemSeq) { cardList.Add(tmp); break; } } } transform.root.FindChild("PlayerCard").GetComponent <PlayerCard>().Init(cardList, mItemInfo.productCode); UtilMgr.DismissLoading(); }
void queryInventoryFailedEvent(string error) { UtilMgr.DismissLoading(); Debug.Log("queryInventoryFailedEvent: " + error); }
void purchaseCompleteAwaitingVerificationEvent(string purchaseData, string signature) { UtilMgr.DismissLoading(); Debug.Log("purchaseCompleteAwaitingVerificationEvent. purchaseData: " + purchaseData + ", signature: " + signature); }
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(); }
public void InitQuizFirst() { UtilMgr.DismissLoading(); InitQuizList(null); }
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); } } } }
void consumePurchaseSucceededEvent(GooglePurchase purchase) { UtilMgr.DismissLoading(); mDoneIAP(); }
void consumePurchaseFailedEvent(string error) { UtilMgr.DismissLoading(); DialogueMgr.ShowDialogue("Consume Failed", mItemname + " Consume Failed", DialogueMgr.DIALOGUE_TYPE.Alert, null); // Debug.Log ("FailedConsume"); }
void purchaseFailedEvent(string receipt) { UtilMgr.DismissLoading(); }
void purchaseFailedEvent(string error, int response) { UtilMgr.DismissLoading(); Debug.Log("purchaseFailedEvent: " + error + ", response: " + response); }
void mCancelIAP() { UtilMgr.DismissLoading(); DialogueMgr.ShowDialogue("구매 실패", mItemname + " 구매를 실패 했습니다.", DialogueMgr.DIALOGUE_TYPE.Alert, null); Debug.Log("FailedEvent"); }