public async ETTask Close() { if (animation) { animation.DOPlayBackwards(); Sate = UISetting.UISate.HideAnima; await YuoWait.WaitTimeAsync(animation.duration); } Sate = UISetting.UISate.Hide; }
public static async void Shield(string str, float time) { if (!shiled.ContainsKey(str)) { shiled.Add(str, true); } shiled[str] = false; await YuoWait.WaitTimeAsync(time); shiled[str] = true; }
public async ETTask Open() { if (animation) { animation.DOPlayForward(); Sate = UISetting.UISate.ShowAnima; await YuoWait.WaitTimeAsync(animation.duration); } Sate = UISetting.UISate.Show; }
public async void SwitchSate() { Sate.Reverse(); if (SaveSate) { for (int i = 0; i < SwitchGos.Length; i++) { if (!Sate) { RebuildSates[i] = SwitchGos[i].activeSelf; SwitchGos[i].SetActive(Sate); } else { if (RebuildSates[i]) { SwitchGos[i].SetActive(RebuildSates[i]); } } } } else { foreach (var item in SwitchGos) { item.SetActive(Sate); } } if (ForceRebuildLayout) { Rebuild(); await YuoWait.WaitTimeAsync(0); Rebuild(); } }