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; }