/// <summary> 상점 보통 슬롯 클릭 매서드 </summary> public void OnClickProductNormalSlotButton() { if (shopProductSlotData.category != "item" && DrawManager.Instance.drawCoroutine != null) { return; } UIPopupManager.ShowYesNoPopup("Item 상품", "구매하시겠습니까?", NormalSlotYesNoResult); }
public void OnClickDeployHero() { if (place.placeState != PlaceState.MyPlace) { UIPopupManager.ShowInstantPopup("소유하지 않은 영지 입니다."); return; } UIDeployHeroInfo.Instance.Show(place.placeID); }
/// <summary> 해당 슬롯 클릭했을 때 </summary> public void OnClickSelectButton() { if (string.IsNullOrEmpty(UIHeroTraining.Instance.selectedTrainingHeroID)) { return; } if (HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList.Count <= statNumber) { return; } int count = 0; for (int i = 0; i < HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList.Count; i++) { count += HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList[i].training; } if (count < HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingMax) { if (toggle.isOn) { textTrainingPoint.text = (HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingMax - count - 1).ToString(); int num = HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList[statNumber].training; num++; textTrainingValue.color = upColor; textTrainingValue.text = num + "단계"; selectJewel.SetActive(true); if (onClickStatSelectButton != null) { onClickStatSelectButton(statNumber); } } else { textTrainingValue.color = nonColor; textTrainingValue.text = HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList[statNumber].training + "단계"; selectJewel.SetActive(false); } } else { UIPopupManager.ShowOKPopup("훈련 불가", "남은 훈련치가 없습니다", null); textTrainingValue.color = nonColor; textTrainingValue.text = HeroManager.heroDataDic[UIHeroTraining.Instance.selectedTrainingHeroID].trainingDataList[statNumber].training + "단계"; selectJewel.SetActive(false); } }
private void AllClearBonus() { var popup = UIPopupManager.GetPopup("AllClearBonus"); UIPopupManager.ShowPopup(popup, popup.AddToPopupQueue, false); _scoreModel.AddScore = 5000; _autoCreateState.SendTrigger(ItemCreaterMessage.ALL_CLEAR_STAGE_ITEMS_CREATE); }
public void OnClickBuyTicket() { if (MoneyManager.GetMoney(MoneyType.ruby).value < 500) { BuyTicketResult(false); return; } UIPopupManager.ShowYesNoPopup("구매", "500루비에 입장권5개 구매하시겠습니까?", PopupResult); }
public void OnClickGold() { if (imageGoldIcon.fillAmount < 1) { UIPopupManager.ShowInstantPopup("세금이 충분히 모이지 않았습니다."); return; } if (coroutineScaleImage != null) { StopCoroutine(coroutineScaleImage); coroutineScaleImage = null; } coroutineScaleImage = StartCoroutine(ScaleImage()); if (currentGoldAmount > 0) { if (spawnCoroutine != null) { return; } coinAmount = currentGoldAmount * Probability(); currentGoldAmount = 0; taxCount = 0; OnSave(); imageBGGoldIcon.gameObject.SetActive(false); spawnCoroutine = StartCoroutine(Spawn()); imageBGGoldIcon.sprite = spriteGoldList[0]; imageGoldIcon.sprite = spriteGoldList[0]; //particleSystem.gameObject.SetActive(true); slot = UIMoney.Instance.shopMoneyGoldText.gameObject.AddComponent <UIMoneySlot>(); //slot.isUserMoney = true; //slot.moneyType = MoneyType.gold; money = new MoneyManager.Money(); MoneyManager.Money m = MoneyManager.GetMoney(MoneyType.gold); money.id = m.id; money.value = m.value; money.type = m.type; slot.textValue = UIMoney.Instance.shopMoneyGoldText; slot.Init(money); CoinObject coin = CreatCoinObject(); coin.Init(coinAmount, coinParent); coin.gameObject.SetActive(true); //사운드 재생 soundPlayerTakeCoins.Play(); } //AutoGoldGenStart(); }
void BattleLogServerResult(bool isResult) { if (isResult) { ShowLog(); } else { UIPopupManager.ShowInstantPopup("서버연결이 고르지 않습니다. 다시 시도해 주세요"); } }
void Awake() { main = this; popupContainer = this.FindChildObject("container").GetComponent <Transform>(); EventSystem eventSystem = GameObject.FindObjectOfType <EventSystem>(); if (eventSystem == null) { Prefabs.Get <EventSystem>(); } }
/// <summary> 랭킹 서버 연결 결과 </summary> void ServerConnectResult(bool isResult) { if (isResult) { Show(); } else { UIPopupManager.ShowInstantPopup("서버 연결 실패"); } }
void ServerResult(bool isResult) { if (isResult) { BattleEnd(); } else { UIPopupManager.ShowInstantPopup("서버 연결 실패"); } }
public void OnClickChangeTrainingHero() { if (isChangable == true) { UIHeroTraining.Instance.slotNumber = slotNumber; UIHeroTraining.Instance.ShowSelectPanel(); } else { UIPopupManager.ShowInstantPopup("훈련 완료전까지 영웅을 교체할 수 없습니다"); } }
void ServerResult(bool isResult) { if (isResult) { pvpPanel.SetActive(true); Show(); } else { UIPopupManager.ShowInstantPopup("서버연결이 고르지 않습니다. 다시 시도해 주세요"); } }
/// <summary> 랭킹보상에 대한 서버 연결 결과 </summary> void ServerConnectResultGetReward(bool isResult) { if (isResult) { UIPopupManager.ShowInstantPopup("보상 획득"); buttonReward.gameObject.SetActive(false); } else { UIPopupManager.ShowInstantPopup("서버 연결 실패"); } }
/// <summary> 도감 DB에 변경된 수치를 Update시키는 코루틴 </summary> IEnumerator SetAchievementData() { int amount = 0; DictionaryManager.HeroDictionaryData heroDicData = DictionaryManager.heroDictionaryDataDic[heroData.heroID]; int rewardStep = heroDicData.rewardStep; switch (rewardStep) { case 0: amount = 10; break; case 1: amount = 30; break; case 2: amount = 100; break; } rewardStep += 1; WWWForm form = new WWWForm(); form.AddField("userID", User.Instance.userID); form.AddField("heroID", Instance.heroID); form.AddField("rewardAmount", amount); form.AddField("achievementLevel", rewardStep); form.AddField("type", 4); string php = "Dictionary.php"; string result = ""; yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); if (!string.IsNullOrEmpty(result) && result == "0") { Debug.LogError("잘못된 접근입니다. 도감획득단계보다 보상단계가 높거나 같습니다"); } else { heroDicData.rewardStep = rewardStep; UIPopupManager.ShowOKPopup("보상 획득", "보상을 획득했습니다\n메일함을 확인해주세요", InitDictionaryOpen); if (UIDictionary.Instance) { UIDictionary.Instance.heroSlotList.Find(x => x.heroData.heroID == Instance.heroID).SlotDataInit(Instance.heroID, DicionaryState.Default); } yield return(StartCoroutine(MailManager.MailDataInitCoroutine())); } }
IEnumerator UnlockAutoQuestRubyA() { if (currentBattleQuestAuto == null) { yield break; } //클라에서 먼저 한 번 검사 double autoQuestCost = currentBattleQuestAuto.autoQuestCostRuby; if (autoQuestCost > MoneyManager.GetMoney(MoneyType.ruby).value) { UIPopupManager.ShowOKPopup("", "루비가 부족합니다.", null); yield break; } //서버 통신 LoadingManager.Show(); string result = null; string php = "Battle.php"; WWWForm form = new WWWForm(); form.AddField("type", 3); form.AddField("userID", User.Instance.userID); form.AddField("questID", currentBattleQuestAuto.baseData.id); yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); LoadingManager.Close(); //실제로 가지고 있는 루비 부족하면 실패 처리 if (result == "false") { UIPopupManager.ShowOKPopup("", "루비가 부족합니다.", null); yield break; } //자동 실행 on currentBattleQuestAuto.isAutoRepeat = true; //데이타 저장 SaveQuestData(currentBattleQuestAuto); int curIndex = battleQuestList.IndexOf(currentBattleQuestAuto); if (curIndex + 1 < battleQuestList.Count) { currentBattleQuestAuto = battleQuestList[curIndex + 1]; } }
IEnumerator PlatformLogin(LoginType logintType) { string platformID = ""; if (logintType == LoginType.GoogleLogin) { if (GoogleManager.Instance) { GoogleManager.Instance.LogIn(); } while (GoogleManager.Instance.isInitialized) { yield return(null); } while (string.IsNullOrEmpty(Social.localUser.id)) { yield return(null); } platformID = Social.localUser.id; } else if (logintType == LoginType.FacebookLogin) { //콜백으로 대체 #if UNITY_ANDROID if (FacebookManager.Instance) { FacebookManager.Instance.LogIn(); } while (string.IsNullOrEmpty(FacebookManager.Instance.UserID)) { yield return(null); } platformID = FacebookManager.Instance.UserID; #endif } else if (logintType == LoginType.GuestLogin) { UIPopupManager.ShowYesNoPopup("경고", "게스트 로그인시\n데이터 손실을\n책임지지 않습니다", AgreeGuestLogIn); coroutineLogin = null; yield break; } StartCoroutine(Login("", platformID, logintType)); coroutineLogin = null; }
void OnWebServerResult(Dictionary <string, object> resultDataDic) { if (resultDataDic.ContainsKey("coupon")) { LoadingManager.Show(); JsonReader json = new JsonReader(JsonMapper.ToJson(resultDataDic["coupon"])); JsonData jsonData = JsonMapper.ToObject(json); string itemID = jsonData["itemID"].ToStringJ(); UIPopupManager.ShowOKPopup("쿠폰 사용 완료", GameDataManager.moneyBaseDataDic[itemID].name + "이(가) 우편으로 지급되었습니다", null); } }
void PopupResultBoost(string result) { if (result == "yes") { #if !UNITY_EDITOR if (Application.internetReachability == NetworkReachability.NotReachable) { UIPopupManager.ShowOKPopup("네트워크 연결 불량", "네트워크 연결 상태를 확인해주세요", null); return; } #endif StartCoroutine(ShowAdForBoost()); } }
public void OnClickAgreeForUse() { if (isAgreeForUseNecessary && isAgreeFroUseSelection) { PlayerPrefs.SetString("agreement", "AgreeAll"); agreementPanel.SetActive(false); agreeAllForUse = true; } else { UIPopupManager.ShowOKPopup("약관동의", "약관에 모두 동의하셔야 진행할 수 있습니다.", null); } }
IEnumerator MailReceiveItemCoroutine(string mailID, Action <bool> isResult) { WWWForm form = new WWWForm(); form.AddField("userID", User.Instance.userID); form.AddField("type", 3); form.AddField("id", mailID); string php = "Mail.php"; string result = ""; yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); mailDataList.RemoveAt(mailDataList.FindIndex(x => x.mailID == mailID)); JsonData jsonData = null; bool isReceiveItemSuccess = false; if (!string.IsNullOrEmpty(result)) { isReceiveItemSuccess = true; //jsonData = ParseCheckDodge(result); JsonReader jReader = new JsonReader(result); JsonData jData = JsonMapper.ToObject(jReader); List <string> keys = GameDataManager.moneyBaseDataDic.Keys.ToList(); bool isMoneyData = false; for (int i = 0; i < keys.Count; i++) { string key = keys[i]; if (jData.ContainsKey(key)) { isMoneyData = true; } } if (isMoneyData) { UIPopupManager.ShowOKPopup("우편 첨부 아이템 받기", "받은 첨부 아이템 : " + MailReceiveMessage(result), null); } else { UIPopupManager.ShowOKPopup("우편 첨부 아이템 받기", "아이템 수령 완료", null); } //Debug.Log("받은 첨부 아이템 : " + JsonParser.ToString(jsonData["itemID"]) + "/" + JsonParser.ToString(jsonData["itemAmount"])); isResult(isReceiveItemSuccess); } MailReceiveOrNot(); }
/// <summary> 승급 버튼 눌렀을 때 </summary> public void OnClickPromote() { if (needRubyPromote > MoneyManager.GetMoney(MoneyType.ruby).value) { UIPopupManager.ShowOKPopup("루비 부족", "루비가 부족합니다", null); return; } if (coPromote != null) { return; } coPromote = StartCoroutine(HeroPromote()); }
private void RequestAuthCode(SteamKit2.EResult result) { TaskManagerController.RunAction(() => { var authPopup = UIPopupManager.ShowPopup("AuthPopup", true, false); authPopup.Data.SetButtonsCallbacks( () => { authPopup.Hide(); }, () => { var authItems = authPopup.GetComponent <AuthPopupItemsContainer>(); SteamController.steamInScene.steam3.SendAuth(authItems.authField.text); authPopup.Hide(); }); }); }
void BattleStartResult(bool result) { if (result) { if (coroutine != null) { return; } coroutine = StartCoroutine(ShowBattleScene()); } else { UIPopupManager.ShowInstantPopup("입장권이 부족합니다."); } }
public void OnClickUseUnlimitedEssence() { if (MoneyManager.GetMoney(MoneyType.limitBreakTicket).value - unlimitedJeweluse <= 0) { UIPopupManager.ShowInstantPopup("무한의정수가 부족합니다"); return; } unlimitedJeweluse += 1; textUnlimitedJewelCount.text = (MoneyManager.GetMoney(MoneyType.limitBreakTicket).value - unlimitedJeweluse).ToString(); textUnlimitedJewelUse.text = unlimitedJeweluse.ToString(); OnChangedTrainingMaxValue(); }
IEnumerator ServerShopDataCheck(int type, ShopData shopData, Action <string> resultData = null, string transactionID = null, string check = null) { WWWForm form = new WWWForm(); form.AddField("userID", User.Instance.userID, System.Text.Encoding.UTF8); form.AddField("type", type); form.AddField("shopID", shopData.id, System.Text.Encoding.UTF8); if (transactionID != null) { form.AddField("transactionID", transactionID); } if (check != null) { form.AddField("check", check); } string php = "ShopInfo.php"; string result = ""; yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); if (resultData != null) { resultData(result); } if (type != 5 && !string.IsNullOrEmpty(result) && result == "0") { UIPopupManager.ShowOKPopup("구매 실패", GameDataManager.moneyBaseDataDic[shopData.costType].name + "이(가) 부족합니다", null); } else if ((type == 5 || type == 6) && !string.IsNullOrEmpty(result) && result == "2") { UIPopupManager.ShowOKPopup("구매 실패", "구매가 정상처리 되지 않았습니다", null); } else { UIPopupManager.ShowOKPopup("구매 완료", shopData.goodsName + "을(를) 구매하셨습니다", null); if (shopData.category == "package") { yield return(StartCoroutine(MailManager.MailDataInitCoroutine())); } #if !UNITY_EDITOR yield return(StartCoroutine(AdController.Instance.CheckPayedPlayer())); #endif } LoadingManager.Close(); UIShop.Instance.loadingPanel.SetActive(false); }
/// <summary> 고용 버튼 눌림 </summary> public void OnClickEmployButton() { // 골드 체크 // 서버로 날림 해당 영웅 아이디와 골드량 체크해서 넣어주도록 //int cost = cost; if (cost > MoneyManager.GetMoney(MoneyType.gold).value) { UIPopupManager.ShowYesNoPopup("재화 부족!!", "골드가 부족합니다. 상점으로 가시겠습니까?", PopupResult); } else { if (onClickEmploy != null) { onClickEmploy(heroID); } } }
void BattleStartResult(bool result) { if (result) { if (coroutine != null) { return; } BattleDayDungeonManager.BattleStart(currentTapDay, dungeonLevel); coroutine = StartCoroutine(ShowBattleScene()); } else { UIPopupManager.ShowInstantPopup("입장권이 부족합니다."); } }
/// <summary> 영지 추가 </summary> IEnumerator PlaceAddCoroutine() { string result = null; yield return(StartCoroutine(TerritoryServerConnect(TerritoryManager.territoryPHPConnectType.PlaceAdd, placeID, x => result = x, addCost))); placeAddCoroutine = null; // 서버 채크 if (result == null) { UIPopupManager.ShowInstantPopup("[" + GameDataManager.placeBaseDataDic[placeID].name + "]를 점령!!"); } else if (result == "NoMoney") { UIPopupManager.ShowInstantPopup("재화가 부족합니다."); } }
IEnumerator PlaceUpgradeCoroutine(int amount = 1) { string result = null; yield return(StartCoroutine(TerritoryServerConnect(TerritoryManager.territoryPHPConnectType.PlaceUpgrade, placeID, x => result = x, upgradeCost, amount))); placeUpgradeCoroutine = null; // 서버 채크 if (result == null) { UIPopupManager.ShowInstantPopup("[" + GameDataManager.placeBaseDataDic[placeID].name + "]를 [" + placeLevel + "]레벨으로 강화 완료!!"); } else if (result == "NoMoney") { UIPopupManager.ShowInstantPopup("재화가 부족합니다."); } }
public void OnClickApplyCouponButton() { couponNum.Clear(); for (int i = 0; i < couponInputList.Count; i++) { if (couponInputList[i].text.Length < 4) { UIPopupManager.ShowOKPopup("쿠폰 입력 오류", "잘못된 쿠폰코드를 입력하셨습니다", null); return; } couponNum.Add(couponInputList[i].text); } StartCoroutine(ApplyCoupon()); }