public void OnClickGetHero() { string heroID = inputField.text; if (string.IsNullOrEmpty(heroID)) { UIPopupManager.ShowInstantPopup("영웅 아이디 입력하시오"); return; } if (GameDataManager.heroBaseDataDic.ContainsKey(heroID) == false) { UIPopupManager.ShowInstantPopup("존재하지 않는 영웅 아이디 입니다"); return; } if (coroutine != null) { return; } coroutine = StartCoroutine(GetCoroutine(1, heroID)); Close(); }
void ServerResult(bool isResult) { //Debug.Log("pvp 서버 접속 결과 : " + isResult); if (isResult) { currentTapDay = BattleDayDungeonManager.today; string key = currentTapDay.ToString() + "_SaveDungeonLevel_" + User.Instance.userID; if (PlayerPrefs.HasKey(key)) { // 해당 요일에 가장 마지막에 도전했던 난이도 불러옴 dungeonLevel = PlayerPrefs.GetInt(key); } else { dungeonLevel = topLevel; } Show(); } else { UIPopupManager.ShowInstantPopup("서버연결이 고르지 않습니다. 다시 시도해 주세요"); } }
public void OnClickStartTradeButton() { if (tradeData == null) { return; } if (tradeData.isTrade == true) { OnClickRemoveButton(); return; } if (Storage.GetItemStoredAmount(sellMaterialID) < tradeData.sellAmount) { UIPopupManager.ShowInstantPopup("재고가 부족합니다"); return; } if (tradeData.isTrade == false) { tradeData.TradeStart(); value = tradeData.remainingTime; } }
void BuyTicketResult(bool result) { if (result == false) { UIPopupManager.ShowInstantPopup("루비가 부족합니다."); } }
IEnumerator EmployServerConntect(VisitedHeroData data) { string heroID = data.heroID; string php = "Hero.php"; WWWForm form = new WWWForm(); form.AddField("userID", User.Instance.userID); form.AddField("type", 8); form.AddField("heroID", data.heroID); form.AddField("visitOrder", data.visitOrder); string result = ""; yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); if (string.IsNullOrEmpty(result)) { //Debug.Log("이상 없음 !!!"); visitedHeroList.Remove(data); if (onRemoveVisitedHero != null) { onRemoveVisitedHero(); } UIPopupManager.ShowInstantPopup(HeroManager.heroBaseDataDic[heroID].name + "를 고용하였습니다."); } else { UIPopupManager.ShowInstantPopup("골드가 부족합니다."); //Debug.Log("이상 있음 : " + result); } }
public void OnClickDeployHero() { if (place.placeState != PlaceState.MyPlace) { UIPopupManager.ShowInstantPopup("소유하지 않은 영지 입니다."); return; } UIDeployHeroInfo.Instance.Show(place.placeID); }
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(); }
/// <summary> 랭킹 서버 연결 결과 </summary> void ServerConnectResult(bool isResult) { if (isResult) { Show(); } else { UIPopupManager.ShowInstantPopup("서버 연결 실패"); } }
void BattleLogServerResult(bool isResult) { if (isResult) { ShowLog(); } else { UIPopupManager.ShowInstantPopup("서버연결이 고르지 않습니다. 다시 시도해 주세요"); } }
void ServerResult(bool isResult) { if (isResult) { BattleEnd(); } else { UIPopupManager.ShowInstantPopup("서버 연결 실패"); } }
/// <summary> 랭킹보상에 대한 서버 연결 결과 </summary> void ServerConnectResultGetReward(bool isResult) { if (isResult) { UIPopupManager.ShowInstantPopup("보상 획득"); buttonReward.gameObject.SetActive(false); } 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("서버연결이 고르지 않습니다. 다시 시도해 주세요"); } }
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(); }
void BattleStartResult(bool result) { if (result) { if (coroutine != null) { return; } coroutine = StartCoroutine(ShowBattleScene()); } else { UIPopupManager.ShowInstantPopup("입장권이 부족합니다."); } }
void BattleStartResult(bool result) { if (result) { if (coroutine != null) { return; } BattleDayDungeonManager.BattleStart(currentTapDay, dungeonLevel); coroutine = StartCoroutine(ShowBattleScene()); } else { 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("재화가 부족합니다."); } }
/// <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("재화가 부족합니다."); } }
/// <summary> 영지 업그레이드 버튼 눌렀을 때 </summary> public void OnClickPlaceUpgradeButton() { if (MoneyManager.GetMoney(MoneyType.gold).value < TerritoryManager.placeCost) { string message = MoneyManager.GetMoney(MoneyType.gold).id + "@가 부족합니다."; UIPopupManager.ShowInstantPopup(message); return; } if (MoneyManager.GetMoney(MoneyType.placeTicket).value < 1) { string message = MoneyManager.GetMoney(MoneyType.placeTicket).id + "@가 부족합니다."; UIPopupManager.ShowInstantPopup(message); return; } place.PlaceUpgrade(); objectConstruct.SetActive(false); objectConstruct.SetActive(true); Close(); }
void OnWebServerResult(Dictionary <string, object> resultDataDic) { if (resultDataDic.ContainsKey("battlePvP")) { JsonReader json = new JsonReader(JsonMapper.ToJson(resultDataDic["battlePvP"])); JsonData jsonData = JsonMapper.ToObject(json); userPvPScore = jsonData["pvpScore"].ToInt(); userPvPRank = jsonData["rank"].ToInt(); float reminingTime = 0; if (jsonData.ContainsKey("remainingTime")) { reminingTime = jsonData["remainingTime"].ToFloat(); } startTime = Time.unscaledTime + reminingTime; } if (resultDataDic.ContainsKey("battlePvPOpponent")) { JsonReader json = new JsonReader(JsonMapper.ToJson(resultDataDic["battlePvPOpponent"])); JsonData jsonData = JsonMapper.ToObject(json); opponentPvPUserID = jsonData["userID"].ToString(); opponentPvPNickname = jsonData["nickname"].ToString(); opponentPvPScore = jsonData["pvpScore"].ToInt(); opponentPvPRank = jsonData["rank"].ToInt(); blueTeamDataList.Clear(); if (jsonData["heroList"] == null) { UIPopupManager.ShowInstantPopup("상대방의 영웅 정보가 존재하지 않음"); return; } for (int i = 0; i < jsonData["heroList"].Count; i++) { HeroData hero = InitHeroData(jsonData["heroList"][i]); if (hero != null) { blueTeamDataList.Add(hero); } } } if (resultDataDic.ContainsKey("battlePvPResult")) { JsonReader json = new JsonReader(JsonMapper.ToJson(resultDataDic["battlePvPResult"])); JsonData jsonData = JsonMapper.ToObject(json); userPvPResultScore = jsonData["pvpScore"].ToInt(); userPvPResultRank = jsonData["rank"].ToInt(); } if (resultDataDic.ContainsKey("battleLog")) { JsonReader json = new JsonReader(JsonMapper.ToJson(resultDataDic["battleLog"])); JsonData jsonData = JsonMapper.ToObject(json); userPvPWinCount = 0; userPvPLossCount = 0; if (jsonData.ContainsKey("winCount")) { userPvPWinCount = jsonData["winCount"].ToInt(); } if (jsonData.ContainsKey("lossCount")) { userPvPLossCount = jsonData["lossCount"].ToInt(); } battleLogList.Clear(); if (jsonData.ContainsKey("battleLogList")) { for (int i = 0; i < jsonData["battleLogList"].Count; i++) { BattleLogData battleLogData = new BattleLogData(jsonData["battleLogList"][i]); battleLogList.Add(battleLogData); } } } }