private void SetPlaneNum(SlotitemModel item, ShipModel ship) { if (item.IsPlane()) { this.PlaneNum.text = ship.Tousai[this.SlotItemNo - 1].ToString(); this.PlaneNumParent.SetActive(true); } else { this.PlaneNumParent.SetActive(false); } }
private void SetPlaneNum(SlotitemModel item, ShipModel ship) { if (item.IsPlane()) { PlaneNum.text = ship.Tousai[SlotItemNo - 1].ToString(); PlaneNumParent.SetActive(isActive: true); } else { PlaneNumParent.SetActive(isActive: false); } }
public void Initialize(int index, SlotitemModel itemModel, ShipModel shipModel) { this.index = index; this.mModel = itemModel; bool flag = false; this.isExSlot = (shipModel.HasExSlot() && shipModel.SlotCount <= index); base.get_transform().SetActiveChildren(true); if (this.ExSlotButton != null) { this.ExSlotButton.get_transform().get_parent().SetActive(false); } if (itemModel != null) { this.mLabel_Name.text = this.mModel.Name; if (itemModel.IsLocked()) { this.mLock_Icon.get_transform().set_localScale(Vector3.get_one()); } else { this.mLock_Icon.get_transform().set_localScale(Vector3.get_zero()); } this.mSprite_TypeIcon.spriteName = "icon_slot" + itemModel.Type4; flag = itemModel.IsPlane(true); if (flag) { this.mLabel_PlaneCount.text = shipModel.TousaiMax[index].ToString(); } } else { this.mLabel_Name.text = "-"; this.mLock_Icon.get_transform().set_localScale(Vector3.get_zero()); this.mSprite_TypeIcon.spriteName = "icon_slot_notset"; } this.mLabel_PlaneCount.SetActive(flag); this.SetPlaneSkill(itemModel); this.InitializeButtonColor(this.mButton_Action); this.levelStar.Init(itemModel); if (this.isExSlot) { this.ChangeExMode(); } else { this.ChangeNormalMode(); } }
public void Initialize(int index, SlotitemModel itemModel, ShipModel shipModel) { this.index = index; mModel = itemModel; bool flag = false; isExSlot = (shipModel.HasExSlot() && shipModel.SlotCount <= index); base.transform.SetActiveChildren(isActive: true); if (ExSlotButton != null) { ExSlotButton.transform.parent.SetActive(isActive: false); } if (itemModel != null) { mLabel_Name.text = mModel.Name; if (itemModel.IsLocked()) { mLock_Icon.transform.localScale = Vector3.one; } else { mLock_Icon.transform.localScale = Vector3.zero; } mSprite_TypeIcon.spriteName = "icon_slot" + itemModel.Type4; flag = itemModel.IsPlane(dummy: true); if (flag) { mLabel_PlaneCount.text = shipModel.TousaiMax[index].ToString(); } } else { mLabel_Name.text = "-"; mLock_Icon.transform.localScale = Vector3.zero; mSprite_TypeIcon.spriteName = "icon_slot_notset"; } mLabel_PlaneCount.SetActive(flag); SetPlaneSkill(itemModel); InitializeButtonColor(mButton_Action); levelStar.Init(itemModel); if (isExSlot) { ChangeExMode(); } else { ChangeNormalMode(); } }
private void SetPlaneSkill(SlotitemModel item) { if (item != null && item.IsPlane()) { int skillLevel = item.SkillLevel; if (skillLevel == 0) { PlaneSkill.SetActive(isActive: false); mLabel_PlaneCount.transform.localPosition = PlaneNumPos_NoSkill; return; } PlaneSkill.SetActive(isActive: true); PlaneSkill.spriteName = "skill_" + skillLevel; PlaneSkill.MakePixelPerfect(); mLabel_PlaneCount.transform.localPosition = PlaneNumPos_SkillPos; } else { PlaneSkill.SetActive(isActive: false); } }
private void SetPlaneSkill(SlotitemModel item) { if (item.IsPlane()) { int skillLevel = item.SkillLevel; if (skillLevel == 0) { this.PlaneSkill.SetActive(false); this.PlaneNumParent.get_transform().set_localPosition(this.PlaneNumPos_NoSkill); } else { this.PlaneSkill.SetActive(true); this.PlaneSkill.spriteName = "skill_" + skillLevel; this.PlaneSkill.MakePixelPerfect(); this.PlaneNumParent.get_transform().set_localPosition(this.PlaneNumPos_SkillPos); } } else { this.PlaneSkill.SetActive(false); } }