コード例 #1
0
    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();
        });
    }
コード例 #2
0
    protected void SetGoodsPrice(int price, RuneGrade runeGrade)
    {
        if (RuneService.IsPlusGrade(runeGrade))
        {
            price = RuneService.GetPriceOfPlusGrade(runeGrade);
        }

        goodsPrice.text = price.ToString();
    }
コード例 #3
0
    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;
    }
コード例 #4
0
    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;
        }
    }
コード例 #5
0
 private void SetRuneGrade(RuneGrade runeGrade)
 {
     this.goodsGrade.text = RuneService.GetNameStrByGrade(runeGrade);
 }
コード例 #6
0
    public override void SetUIRune(RuneData newRuneData)
    {
        base.SetUIRune(newRuneData);

        gradeText.text = RuneService.GetNameStrByGrade(newRuneData.Grade);
    }
コード例 #7
0
 public void  Initialize()
 {
     RuneService.Initialize();
     PotionService.Initialize();
     ArtifactService.Initialize();
 }
コード例 #8
0
 public void SetGoodsGrade(RuneGrade runeGrade)
 {
     goodsGrade.text = RuneService.GetNameStrByGrade(runeGrade);
 }