Exemple #1
0
    void refresh(bool isInit = false)
    {
        int   resultReinforceLevel = 0;
        float resultPer            = 0;

        _currentReinforcePrice = 0;

        originalData.reinforceCalc(out resultReinforceLevel, out resultPer, out _currentReinforcePrice, originalData, sourceList);

        targetDisplayData.price = _currentReinforcePrice;
        targetDisplayData.level = resultReinforceLevel;

//		nowDisplayData.price = _currentReinforcePrice;

        if (targetDisplayData.level >= GameIDData.MAX_LEVEL)
        {
            _enoughSelection = true;
            targetDisplayData.progressBarValue   = 1.0f;
            targetDisplayData.progressLabelValue = 100;
        }
        else
        {
            _enoughSelection = false;
            targetDisplayData.progressLabelValue = Mathf.FloorToInt(resultPer * 100.0f);
            targetDisplayData.progressBarValue   = resultPer;
        }

        ++_workIndex;

        // 강화 창 열었을때 기본 세팅.
        if (isInit)
        {
            originalDisplayData.progressBarValue   = originalData.getReinforceProgressPercent();
            originalDisplayData.progressLabelValue = Mathf.FloorToInt(originalDisplayData.progressBarValue * 100.0f);
            originalDisplayData.level = originalData.level;

            nowDisplayData   = targetDisplayData;
            startDisplayData = targetDisplayData;
            startDisplayData.tweenExpValue = startDisplayData.progressBarValue + startDisplayData.level;

            setAllData(true);
        }
        else
        {
            startDisplayData = nowDisplayData;
            startDisplayData.tweenExpValue = startDisplayData.progressBarValue + startDisplayData.level;
            StartCoroutine(valueUpdater(_workIndex));

//			setAllData(false);
        }

        btnReinforce.isEnabled = (sourceList.Count > 0);
    }