Exemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            GetDimensionChipWhenDestroyEquipment = false;
            IsEquipmentExchanging     = false;
            globalDataManager         = FindObjectOfType <GlobalDataManager> ();
            battleBottomManager       = FindObjectOfType <BattleBottomManager> ();
            PopEquipmentManagerScript = FindObjectOfType <PopEquipmentManager> ();
            this.EquipmentBuildData   = globalDataManager.GetValue <EquipmentBuildData> (EquipmentString.EQUIPMENT_BUILD_DATA, EquipmentString.MEMORY_SPACE);
            QualityGrade       = -1;
            this.equipmentType = this.EquipmentBuildData.EquipmentType;
            this.heroData      = this.EquipmentBuildData.HeroData;
            BuildButtonView.Init();
            CurrentAttribute.Init();
            if (EquipmentBuildData.HeroEquipmentData != null)
            {
                CurrentAttribute.SetDataForDisplay(this.heroData, EquipmentBuildData.HeroEquipmentData);
            }
            CurrentEquipment.Init();
            CurrentEquipment.LoadDataToDisplay(EquipmentBuildData.HeroEquipmentData);
            ButtonGroupController.Init();
            BuildButtonView.Init();
            int _auraNow = UserSaveDataManager.Instance.Aura;

            IsResourceEnough(_auraNow);
            EquipmentExchangeManagerScript.Init();
        }
        void Start()
        {
            isReinforceLevelMaxFlag   = false;
            reinforceCostList         = EquipmentReinforceCostTableReader.Instance.DefaultCachedList;
            SelectedLevel             = -1;
            globalDataManager         = FindObjectOfType <GlobalDataManager> ();
            PopEquipmentManagerScript = FindObjectOfType <PopEquipmentManager> ();
            var _equipmentReinforceData = globalDataManager.GetValue <EquipmentReinforceData> (EquipmentString.EQUIPMENT_REINFORCE_DATA, EquipmentString.MEMORY_SPACE);

            this.heroData             = _equipmentReinforceData.HeroData;
            this.heroEquipment        = _equipmentReinforceData.HeroEquipmentData;
            this.reinforceSuccessRate = EquipmentDataManager.Instance.GetEquipmentReinforceSuccessRate(this.heroEquipment.ReinforcementLevel);
            LabelControllerScript.Init();
            LabelControllerScript.LoadDataToDisplay(this.heroEquipment);
            ButtonGroupControllerScript.Init();
            ReinforceButton.Init();
            ReinforceSuccessRateView.Init();
            ushort _labelID = StringsTableReader.Instance.FindID(STRINGS_LABEL.EQUIPMENT_REINFORCEMENT_SUCCESS_RATE_LABEL);
            MultiLangString <StringsTable> _multiLang = new MultiLangString <StringsTable> (_labelID, StringsTableReader.Instance, this.reinforceSuccessRate);

            ReinforceSuccessRateView.SetReinforceSuccessMultiString(_multiLang);
            ReinforceSuccessRateView.Display();
            IsReinforceLevelMax(this.heroEquipment.ReinforcementLevel);
            var _resourceList = EquipmentReinforceCostTableReader.Instance.DefaultCachedList;

            this.minAuraDemand          = _resourceList [0].CostNumber;
            this.minDimensionChipDemand = _resourceList [3].CostNumber;
            int _auraNow           = UserSaveDataManager.Instance.Aura;
            int _auraDimensionChip = UserSaveDataManager.Instance.DimensionChip;

            IsResourceEnough(_auraNow, _auraDimensionChip);
        }