private void Update() { if (mKeyController == null) { return; } if (mKeyController.keyState[14].down) { int num = Array.IndexOf(mItemListChildren, mFocusListChild); int num2 = num - 1; if (0 <= num2) { ChangeFocus(mItemListChildren[num2], playSE: true); } } else if (mKeyController.keyState[10].down) { int num3 = Array.IndexOf(mItemListChildren, mFocusListChild); int num4 = num3 + 1; if (num4 < mItemListChildren.Length) { ChangeFocus(mItemListChildren[num4], playSE: true); } } else if (mKeyController.keyState[8].down) { int num5 = Array.IndexOf(mItemListChildren, mFocusListChild); int num6 = num5 - 7; if (0 <= num6) { ChangeFocus(mItemListChildren[num6], playSE: true); } } else if (mKeyController.keyState[12].down) { int num7 = Array.IndexOf(mItemListChildren, mFocusListChild); int num8 = num7 + 7; if (num8 < mItemListChildren.Length) { ChangeFocus(mItemListChildren[num8], playSE: true); } } else if (mKeyController.keyState[1].down) { if (mFocusListChild != null) { ItemlistModel mModel = mFocusListChild.mModel; if (0 < mModel.Count && mModel.IsUsable()) { SoundUtils.PlaySE(mAudioClip_SE_013); OnSelect(mFocusListChild.mModel); } } } else if (mKeyController.keyState[0].down) { SingletonMonoBehaviour <PortObjectManager> .Instance.BackToActiveScene(); } }
private void Update() { if (this.mKeyController != null) { if (this.mKeyController.keyState.get_Item(14).down) { int num = Array.IndexOf <UIItemListChild>(this.mItemListChildren, this.mFocusListChild); int num2 = num - 1; if (0 <= num2) { this.ChangeFocus(this.mItemListChildren[num2], true); } } else if (this.mKeyController.keyState.get_Item(10).down) { int num3 = Array.IndexOf <UIItemListChild>(this.mItemListChildren, this.mFocusListChild); int num4 = num3 + 1; if (num4 < this.mItemListChildren.Length) { this.ChangeFocus(this.mItemListChildren[num4], true); } } else if (this.mKeyController.keyState.get_Item(8).down) { int num5 = Array.IndexOf <UIItemListChild>(this.mItemListChildren, this.mFocusListChild); int num6 = num5 - 7; if (0 <= num6) { this.ChangeFocus(this.mItemListChildren[num6], true); } } else if (this.mKeyController.keyState.get_Item(12).down) { int num7 = Array.IndexOf <UIItemListChild>(this.mItemListChildren, this.mFocusListChild); int num8 = num7 + 7; if (num8 < this.mItemListChildren.Length) { this.ChangeFocus(this.mItemListChildren[num8], true); } } else if (this.mKeyController.keyState.get_Item(1).down) { if (this.mFocusListChild != null) { ItemlistModel mModel = this.mFocusListChild.mModel; if (0 < mModel.Count && mModel.IsUsable()) { SoundUtils.PlaySE(this.mAudioClip_SE_013); this.OnSelect(this.mFocusListChild.mModel); } } } else if (this.mKeyController.keyState.get_Item(0).down) { SingletonMonoBehaviour <PortObjectManager> .Instance.BackToActiveScene(); } } }
public static void log(ItemlistModel[] items) { string text = string.Empty; for (int i = 0; i < items.Length; i++) { ItemlistModel itemlistModel = items[i]; if (itemlistModel != null) { text += string.Format("{0}{1}\n", itemlistModel, (!itemlistModel.IsUsable()) ? string.Empty : "[使用可能]"); } else { text += " - \n"; } } Logging.log(new object[] { text }); }
public void UpdateInfo(ItemlistModel model) { mModel = model; if (Usable()) { base.transform.SetActive(isActive: true); mLabel_Name.text = model.Name; mLabel_Description.text = UserInterfaceAlbumManager.Utils.NormalizeDescription(15, 1, model.Description); mSprite_Icon.spriteName = $"item_{mModel.MstId}"; if (mModel.IsUsable()) { mButton_Use.transform.SetActive(isActive: true); } else { mButton_Use.transform.SetActive(isActive: false); } } else { base.transform.SetActive(isActive: false); } }