Ejemplo n.º 1
0
        private void Start()
        {
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemSlotTemplate, (UnityEngine.Object)null))
            {
                this.ItemSlotTemplate.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnusedSlotTemplate, (UnityEngine.Object)null))
            {
                this.UnusedSlotTemplate.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemSlotBox, (UnityEngine.Object)null))
            {
                this.ItemSlotBox.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SubPanel, (UnityEngine.Object)null))
            {
                this.SubPanel.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestListItemTemplate, (UnityEngine.Object)null))
            {
                this.QuestListItemTemplate.SetActive(false);
            }
            string categoryName = TobiraParam.GetCategoryName(this.mCurrentTobira.Param.TobiraCategory);

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TitleText, (UnityEngine.Object)null))
            {
                this.TitleText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_ENHANCE_ITEM_BTN_ENHANCE_TITLE"), (object)categoryName));
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MessageText, (UnityEngine.Object)null))
            {
                this.MessageText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_ENHANCE_ITEM_BTN_ENHANCE_MESSAGE"), (object)categoryName));
            }
            this.Refresh();
        }
Ejemplo n.º 2
0
 public void Setup(TobiraData tobiraData)
 {
     if (tobiraData == null)
     {
         DebugUtility.LogError("tobiraDataがnullの時はSetup(TobiraParam param)を使用してください");
     }
     else
     {
         this.m_Category = tobiraData.Param.TobiraCategory;
         this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category));
         this.m_IconTobira.ImageIndex = (int)this.m_Category;
         if (tobiraData.IsLearnedLeaderSkill)
         {
             TobiraLearnSkill listItem = this.CreateListItem();
             SkillData        skill    = new SkillData();
             skill.Setup(tobiraData.LearnedLeaderSkillIname, 1, 1, (MasterParam)null);
             listItem.Setup(skill);
         }
         List <AbilityData> newAbilitys = new List <AbilityData>();
         List <AbilityData> oldAbilitys = new List <AbilityData>();
         TobiraUtility.TryCraeteAbilityData(tobiraData.Param, tobiraData.Lv, newAbilitys, oldAbilitys, false);
         for (int index = 0; index < newAbilitys.Count; ++index)
         {
             this.CreateListItem().Setup(newAbilitys[index]);
         }
         BaseStatus add   = new BaseStatus();
         BaseStatus scale = new BaseStatus();
         TobiraUtility.CalcTobiraParameter(tobiraData.Param.UnitIname, this.m_Category, tobiraData.Lv, ref add, ref scale);
         this.m_StatusList.SetValues(add, scale, false);
         GameUtility.SetGameObjectActive(this.m_ObjectDetail, true);
         GameUtility.SetGameObjectActive(this.m_ObjectLock, false);
         GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, false);
     }
 }
Ejemplo n.º 3
0
        public void Refresh(UnitData unitData, TobiraData tobiraData, TobiraParam tobiraParam)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraTitleText, (UnityEngine.Object)null))
            {
                return;
            }
            this.TobiraTitleText.set_text(TobiraParam.GetCategoryName(tobiraParam.TobiraCategory));
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AdditionalLevelCap, (UnityEngine.Object)null))
            {
                this.AdditionalLevelCap.set_text(MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraUnitLvCapBonus.ToString());
            }
            if (tobiraData == null)
            {
                this.TobiraParamIconEnable.SetActive(false);
                this.TobiraParamIconDisable.SetActive(true);
                Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(0)));
                this.LockView(unitData, tobiraParam);
                this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO)));
                this.mTobiraParameters.Clear();
                BaseStatus add   = new BaseStatus();
                BaseStatus scale = new BaseStatus();
                TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraParam.TobiraCategory, 1, ref add, ref scale);
                this.Status.SetValues(add, scale, true);
                TobiraConditionParam[] conditionsForUnit = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraConditionsForUnit(unitData.UnitID, tobiraParam.TobiraCategory);

                this.CreateConditionsItems(unitData, conditionsForUnit);
            }
            else
            {
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TobiraIcons, (UnityEngine.Object)null))
                {
                    this.TobiraIcons.ImageIndex = (int)tobiraData.Param.TobiraCategory;
                }
                this.TobiraParamIconEnable.SetActive(tobiraData.IsUnlocked);
                this.TobiraParamIconDisable.SetActive(!tobiraData.IsUnlocked);
                int level = tobiraData.ViewLv;
                Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(level)));
                if (tobiraData.IsUnlocked)
                {
                    this.UnlockView(unitData, tobiraData);
                }
                else
                {
                    this.LockView(unitData, tobiraParam);
                }
                this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO)));
                this.mTobiraParameters.Clear();
                BaseStatus add   = new BaseStatus();
                BaseStatus scale = new BaseStatus();
                TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraData.Param.TobiraCategory, tobiraData.Lv, ref add, ref scale);
                this.Status.SetValues(add, scale, false);
                this.SetActiveConditionsItems(false);
            }
            this.SetMasterBonusText(tobiraParam);
        }
Ejemplo n.º 4
0
 public void Setup(TobiraParam param)
 {
     this.m_Category = param.TobiraCategory;
     this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category));
     this.m_IconTobira.ImageIndex = (int)this.m_Category;
     if (param.Enable)
     {
         BaseStatus add   = new BaseStatus();
         BaseStatus scale = new BaseStatus();
         TobiraUtility.CalcTobiraParameter(param.UnitIname, this.m_Category, 1, ref add, ref scale);
         this.m_StatusList.SetValues(add, scale, true);
     }
     GameUtility.SetGameObjectActive(this.m_ObjectDetail, param.Enable);
     GameUtility.SetGameObjectActive(this.m_ObjectLock, param.Enable);
     GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, !param.Enable);
 }
Ejemplo n.º 5
0
 private void UnlockView(UnitData unitData, TobiraData tobiraData)
 {
     this.TobiraLevelUpButtonText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_INVENTORY_BTN_LV_UP"), (object)TobiraParam.GetCategoryName(tobiraData.Param.TobiraCategory)));
     this.TobiraLevelUpButton.SetActive(true);
     this.mLockedLayout.SetActive(!tobiraData.IsUnlocked);
     this.mTobiraConditionsLayout.SetActive(!tobiraData.IsUnlocked);
     this.mUnlockedLayout.SetActive(tobiraData.IsUnlocked);
     this.mTobiraMasterBonusLayout.SetActive(tobiraData.IsUnlocked);
     if (tobiraData.IsMaxLv)
     {
         this.TobiraLevelUpButton.SetActive(false);
         this.mTobiraMasterEbaleLayout.SetActive(true);
     }
     else
     {
         this.TobiraLevelUpButton.SetActive(true);
         this.mTobiraMasterEbaleLayout.SetActive(false);
         bool isEnable = TobiraUtility.IsClearAllToboraRecipe(unitData, tobiraData.Param.TobiraCategory, tobiraData.Lv);
         ((Selectable)this.TobiraOpenButton.GetComponent <Button>()).set_interactable(isEnable);
         UnitTobiraParamWindow.SetHilightAnimationEnable(this.TobiraLevelUpButton, isEnable);
     }
 }
Ejemplo n.º 6
0
        private void LockView(UnitData unitData, TobiraParam tobiraParam)
        {
            this.TobiraOpenButtonText.set_text(string.Format(LocalizedText.Get("sys.TOBIRA_INVENTORY_OPEN_TITLE"), (object)TobiraParam.GetCategoryName(tobiraParam.TobiraCategory)));
            this.mLockedLayout.SetActive(true);
            this.mTobiraConditionsLayout.SetActive(true);
            this.mUnlockedLayout.SetActive(false);
            this.mTobiraMasterBonusLayout.SetActive(false);
            this.mTobiraMasterEbaleLayout.SetActive(false);
            bool isEnable = TobiraUtility.IsClearAllToboraConditions(unitData, tobiraParam.TobiraCategory);

            ((Selectable)this.TobiraOpenButton.GetComponent <Button>()).set_interactable(isEnable);
            UnitTobiraParamWindow.SetHilightAnimationEnable(this.TobiraOpenButton, isEnable);
        }