private void OnAction(UIRemodelEquipSlotItem.ActionType actionType, UIRemodelEquipSlotItem actionObject) { if (this.mUIRemodelEquipSlotItemAction != null) { this.mUIRemodelEquipSlotItemAction(actionType, actionObject); } }
public void Init(ShipModel ship) { this.ship = ship; this.labelName.text = ship.Name; this.labelLevel.text = ship.Level.ToString(); this.stars.init(ship.Srate); this.shipTypeMarkIcon.mainTexture = ResourceManager.LoadShipTypeIcon(ship); UIRemodelEquipSlotItem[] array = this.slots; for (int i = 0; i < array.Length; i++) { UIRemodelEquipSlotItem uIRemodelEquipSlotItem = array[i]; uIRemodelEquipSlotItem.Hide(); } int j; for (j = 0; j < ship.SlotitemList.get_Count(); j++) { this.slots[j].Initialize(j, ship); this.slots[j].SetOnUIRemodelEquipSlotItemActionListener(new UIRemodelEquipSlotItem.UIRemodelEquipSlotItemAction(this.OnUIRemodelEquipSlotItemActionListener)); this.slots[j].Show(); } if (ship.HasExSlot()) { this.slots[j].Initialize(j, ship.SlotitemEx, ship); this.slots[j].Show(); } }
private void OnAction(ActionType actionType, UIRemodelEquipSlotItem actionObject) { if (mUIRemodelEquipSlotItemAction != null) { mUIRemodelEquipSlotItemAction(actionType, actionObject); } }
private void ChangeFocusItem(UIRemodelEquipSlotItem target) { if (currentFocusItem != null) { currentFocusItem.RemoveHover(); } currentFocusItem = target; if (currentFocusItem != null) { currentFocusItem.Hover(); } if (target != _BeforeItem) { SoundUtils.PlayOneShotSE(SEFIleInfos.CommonCursolMove); _BeforeItem = target; } }
private void OnDestroy() { UserInterfacePortManager.ReleaseUtils.Release(ref this.backAreaButton); UserInterfacePortManager.ReleaseUtils.Release(ref this.backAreaButton); UserInterfacePortManager.ReleaseUtils.Release(ref this.backAreaButton); if (this.items != null) { this.items.Clear(); } this.items = null; this.itemContainer = null; this.removeItem = null; this.keyController = null; this.Categories = null; this.ship = null; this.slotItem = null; }
private void OnDestroy() { UserInterfacePortManager.ReleaseUtils.Release(ref backAreaButton); UserInterfacePortManager.ReleaseUtils.Release(ref backAreaButton); UserInterfacePortManager.ReleaseUtils.Release(ref backAreaButton); if (items != null) { items.Clear(); } items = null; itemContainer = null; removeItem = null; keyController = null; Categories = null; ship = null; slotItem = null; }
private void OnDestroy() { UserInterfacePortManager.ReleaseUtils.Release(ref touchBackArea); if (slots != null) { for (int i = 0; i < slots.Length; i++) { slots[i] = null; } } slots = null; parameters = null; currentFocusItem = null; ship = null; keyController = null; _BeforeItem = null; ExSlotDialog = null; }
public void Init(KeyControl keyController, ShipModel ship, UIRemodelEquipSlotItem slotItem) { this.ship = ship; this.slotItem = slotItem; this.group = this.GetHashCode(); if (keyController != null) { keyController.ClearKeyAll(); keyController.firstUpdate = true; } this.keyController = keyController; if (this.items == null) { this.items = new List <CategoryMenuItem>(); } this.items.Clear(); int index = 0; CategoryMenuItem[] componentsInChildren = this.itemContainer.get_transform().GetComponentsInChildren <CategoryMenuItem>(); for (int i = 0; i < componentsInChildren.Length; i++) { CategoryMenuItem categoryMenuItem = componentsInChildren[i]; categoryMenuItem.Init(this, index, this.selectableCategories.IndexOf(this.Categories[index++]) != -1); this.items.Add(categoryMenuItem); } for (int j = 0; j < this.items.get_Count(); j++) { if (this.changeCurrentItem(j)) { this._BeforeIdx = j; break; } } bool flag = slotItem.GetModel() != null; if (flag) { this.removeItem.Init(this, -1, true); } this.removeItem.SetActive(flag); }
public void Init(KeyControl keyController, ShipModel ship, UIRemodelEquipSlotItem slotItem) { this.ship = ship; this.slotItem = slotItem; group = ((UnityEngine.Object) this).GetHashCode(); if (keyController != null) { keyController.ClearKeyAll(); keyController.firstUpdate = true; } this.keyController = keyController; if (items == null) { items = new List <CategoryMenuItem>(); } items.Clear(); int num = 0; CategoryMenuItem[] componentsInChildren = itemContainer.transform.GetComponentsInChildren <CategoryMenuItem>(); foreach (CategoryMenuItem categoryMenuItem in componentsInChildren) { categoryMenuItem.Init(this, num, selectableCategories.IndexOf(Categories[num++]) != -1); items.Add(categoryMenuItem); } for (int j = 0; j < items.Count; j++) { if (changeCurrentItem(j)) { _BeforeIdx = j; break; } } bool flag = slotItem.GetModel() != null; if (flag) { removeItem.Init(this, -1, enabled: true); } removeItem.SetActive(flag); }
public void Initialize(KeyControl keyController, ShipModel shipModel) { keyController.ClearKeyAll(); keyController.firstUpdate = true; this.keyController = keyController; base.enabled = true; ship = shipModel; validShip = UserInterfaceRemodelManager.instance.IsValidShip(); validUnsetAll = UserInterfaceRemodelManager.instance.mRemodelManager.IsValidUnsetAll(UserInterfaceRemodelManager.instance.focusedShipModel.MemId); UIRemodelEquipSlotItem[] array = slots; foreach (UIRemodelEquipSlotItem uIRemodelEquipSlotItem in array) { if (validShip) { uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(UIRemodelEquipSlotItemAction); } else { uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(null); } uIRemodelEquipSlotItem.Hide(); } InitSlotItems(ship); ParameterType[] array2 = new ParameterType[12] { ParameterType.Taikyu, ParameterType.Karyoku, ParameterType.Soukou, ParameterType.Raisou, ParameterType.Kaihi, ParameterType.Taiku, ParameterType.Tous, ParameterType.Taisen, ParameterType.Soku, ParameterType.Sakuteki, ParameterType.Leng, ParameterType.Lucky }; int[] array3 = new int[12] { shipModel.MaxHp, shipModel.Karyoku, shipModel.Soukou, shipModel.Raisou, shipModel.Kaihi, shipModel.Taiku, shipModel.TousaiMaxAll, shipModel.Taisen, shipModel.Soku, shipModel.Sakuteki, shipModel.Leng, shipModel.Lucky }; for (int j = 0; j < array2.Length; j++) { UIRemodelParameter component = ((Component)parameters.transform.GetChild(j)).GetComponent <UIRemodelParameter>(); component.Initialize(array2[j], array3[j]); } currentFocusItem = null; _BeforeItem = slots[0]; Focus(); }
private void UIRemodelEquipSlotItemAction(UIRemodelEquipSlotItem.ActionType actionType, UIRemodelEquipSlotItem actionObject) { if (actionType == UIRemodelEquipSlotItem.ActionType.OnTouch) { if (actionObject == null) { Debug.Log("actionObject is null"); } ChangeFocusItem(actionObject); forward(); } }
private void OnUIRemodelEquipSlotItemActionListener(UIRemodelEquipSlotItem.ActionType actionType, UIRemodelEquipSlotItem actionObject) { if (this.isShown) { UserInterfaceRemodelManager.instance.Forward2SoubiHenkouShortCut(actionObject.GetModel()); } }
public void Initialize(KeyControl keyController, ShipModel shipModel) { keyController.ClearKeyAll(); keyController.firstUpdate = true; this.keyController = keyController; base.set_enabled(true); this.ship = shipModel; this.validShip = UserInterfaceRemodelManager.instance.IsValidShip(); this.validUnsetAll = UserInterfaceRemodelManager.instance.mRemodelManager.IsValidUnsetAll(UserInterfaceRemodelManager.instance.focusedShipModel.MemId); UIRemodelEquipSlotItem[] array = this.slots; for (int i = 0; i < array.Length; i++) { UIRemodelEquipSlotItem uIRemodelEquipSlotItem = array[i]; if (this.validShip) { uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(new UIRemodelEquipSlotItem.UIRemodelEquipSlotItemAction(this.UIRemodelEquipSlotItemAction)); } else { uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(null); } uIRemodelEquipSlotItem.Hide(); } this.InitSlotItems(this.ship); ParameterType[] array2 = new ParameterType[] { ParameterType.Taikyu, ParameterType.Karyoku, ParameterType.Soukou, ParameterType.Raisou, ParameterType.Kaihi, ParameterType.Taiku, ParameterType.Tous, ParameterType.Taisen, ParameterType.Soku, ParameterType.Sakuteki, ParameterType.Leng, ParameterType.Lucky }; int[] array3 = new int[] { shipModel.MaxHp, shipModel.Karyoku, shipModel.Soukou, shipModel.Raisou, shipModel.Kaihi, shipModel.Taiku, shipModel.TousaiMaxAll, shipModel.Taisen, shipModel.Soku, shipModel.Sakuteki, shipModel.Leng, shipModel.Lucky }; for (int j = 0; j < array2.Length; j++) { UIRemodelParameter component = this.parameters.get_transform().GetChild(j).GetComponent <UIRemodelParameter>(); component.Initialize(array2[j], array3[j]); } this.currentFocusItem = null; this._BeforeItem = this.slots[0]; this.Focus(); }