private void SetCombinationButton() { combinationButton.onClick.AddListener(() => { var runeIdAndIsEquippedList = uiCombinationSpace.GetRuneIdAndIsEquippedList(); foreach (var runeIdAndIsEquipped in runeIdAndIsEquippedList) { var runeId = runeIdAndIsEquipped.runeId; var isEquipped = runeIdAndIsEquipped.IsEquipped; RuneManager.Instance.RemoveRune(runeId, isEquipped); } Reset(); /// 조합 과정 /// RuneGrade combinationGrade = uiCombinationSpace.combinationGrade; // 조합된 룬 등급에서 한 단계 업그레이드 된 등급 int randomId = RuneService.GetRandomIdByGrade(combinationGrade + 1); RuneManager.Instance.AddRune(randomId); var uiObtainedRuneByCombinationScreen = MainManager.instance.backCanvas.uiMainMenu.uiIllustratedBook.uiObtainedRuneByCombinationScreen; uiObtainedRuneByCombinationScreen.SetUIObtainedScreen(randomId); UIManager.Instance.ShowNew(uiObtainedRuneByCombinationScreen); HideCombinationButton(); }); }
protected void SetGoodsPrice(int price, RuneGrade runeGrade) { if (RuneService.IsPlusGrade(runeGrade)) { price = RuneService.GetPriceOfPlusGrade(runeGrade); } goodsPrice.text = price.ToString(); }
public void SetUIRuneInfo(RuneData runeData, bool isEquippedRune, UIRune uiRune) { SetName(runeData.Name); SetGrade(RuneService.GetNameStrByGrade(runeData.Grade)); SetImage(runeData.Image); SetDescription(runeData.Description); SetEquipAndReleaseButtonAndText(isEquippedRune); SetAttribute(runeData.AbilityData); this.uiRune = uiRune; this.isEquippedRune = isEquippedRune; }
protected new void SetGoodsPrice(int price, PurchaseCurrency purchaseCurrency) { if (RuneService.IsPlusGrade(runeGrade)) { price = RuneService.GetPriceOfPlusGrade(runeGrade); } goodsPrice.text = price.ToString(); switch (purchaseCurrency) { case PurchaseCurrency.Gold: { if (price <= PlayerDataManager.Instance.playerData.Gold) { goodsPrice.color = Color.black; } else { goodsPrice.color = Color.red; } } break; case PurchaseCurrency.Diamond: { if (price <= PlayerDataManager.Instance.playerData.Diamond) { goodsPrice.color = Color.black; } else { goodsPrice.color = Color.red; } } break; default: Debug.LogError("Error SetGoodsPrice!!"); break; } }
private void SetRuneGrade(RuneGrade runeGrade) { this.goodsGrade.text = RuneService.GetNameStrByGrade(runeGrade); }
public override void SetUIRune(RuneData newRuneData) { base.SetUIRune(newRuneData); gradeText.text = RuneService.GetNameStrByGrade(newRuneData.Grade); }
public void Initialize() { RuneService.Initialize(); PotionService.Initialize(); ArtifactService.Initialize(); }
public void SetGoodsGrade(RuneGrade runeGrade) { goodsGrade.text = RuneService.GetNameStrByGrade(runeGrade); }