1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using UnityEngine;
- public class OnaholeNodeMenuChildThirdRow : OnaholeBaseNodeMenuManager
- {
- private void Awake()
- {
- this.Clear();
- }
- public void Clear()
- {
- this.isInputEnabled = false;
- 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();
- }
- }
- [SerializeField]
- private OnaholeNodeMenuChildSecondRow secondRow;
- }
|