using Assets.Scripts; using Assets.Scripts.UI.Control; using DG.Tweening; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.Events; using UnityEngine.EventSystems; using UnityEngine.UI; public class NewMainNav : MonoBehaviour { public class CustomButton { public Sprite image; public UnityAction action; public CustomButton(Sprite image, UnityAction action) { this.image = image; this.action = action; } } private GameObject exit; private GameObject home; private GameObject back; float delayTime = 0; private List typeArray = new List() { "Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom","Custom2","Mail" }; private List indexs = new List(); private int? shrinkIndex = null; private CustomButton custom = null,custom2 = null; /// /// /// /// 仅展开显示的按钮:1:"Exit",3:"Device",4:"Delay",5:"Setting",6:"Support",7:"Avatar" /// 合上后仍显示的按钮:0:"Back",2:"Home",null:仅PF /// 自定义按钮 8:c1 9:c2 public void SetButtonActive(List indexs,int? shrinkIndex = null, CustomButton custom = null, CustomButton custom2 = null) { this.indexs = indexs; //邮箱常驻 this.indexs.Add(10); this.shrinkIndex = shrinkIndex; this.custom = custom; this.custom2 = custom2; if (custom != null) { transform.Find("Custom").GetComponent