12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- using System;
- using UnityEngine;
- public class OnaholeNodeMenuChildThirdRow : OnaholeBaseNodeMenuManager
- {
- private void Awake()
- {
- this.Clear();
- }
- public void Clear()
- {
- this.isInputEnabled = false;
- this.changeInput = -1;
- this.ClearButtonObject();
- }
- public void CallSkillSelect(string categoryName)
- {
- }
- public void OnEnterSkill()
- {
- }
- protected override void OnEnterMenu()
- {
- base.OnEnterMenu();
- if (base.selectedNodeButton != null)
- {
- base.selectedNodeButton.enterEvent();
- }
- }
- protected override void OnCancelMenu()
- {
- base.OnCancelMenu();
- this.isInputEnabled = false;
- this.ClearButtonObject();
- this.secondRow.ReturnMenu();
- }
- private void ClearButtonObject()
- {
- Transform transform = this.menuButtonGrid.transform;
- GameObject[] array = new GameObject[transform.childCount];
- for (int i = 0; i < transform.childCount; i++)
- {
- array[i] = transform.GetChild(i).gameObject;
- }
- for (int j = 0; j < array.Length; j++)
- {
- UnityEngine.Object.DestroyImmediate(array[j]);
- }
- transform.DetachChildren();
- this.menuButtons.Clear();
- }
- protected override void Update()
- {
- if (base.inputDownKey)
- {
- base.NextItem();
- }
- else if (base.inputUpKey)
- {
- base.PrevItem();
- }
- else if (base.inputEnterKey || base.inputRightKye)
- {
- this.OnEnterMenu();
- }
- else if (base.inputCancelKey || base.inputLeftKey)
- {
- this.OnCancelMenu();
- }
- if (this.changeInput != -1)
- {
- this.isInputEnabled = (this.changeInput == 1);
- }
- this.changeInput = -1;
- }
- [SerializeField]
- private OnaholeNodeMenuChildSecondRow secondRow;
- private int changeInput;
- }
|