示例#1
0
        public async ETTask Close()
        {
            if (animation)
            {
                animation.DOPlayBackwards();
                Sate = UISetting.UISate.HideAnima;
                await YuoWait.WaitTimeAsync(animation.duration);
            }

            Sate = UISetting.UISate.Hide;
        }
示例#2
0
    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;
    }
示例#3
0
        public async ETTask Open()
        {
            if (animation)
            {
                animation.DOPlayForward();
                Sate = UISetting.UISate.ShowAnima;
                await YuoWait.WaitTimeAsync(animation.duration);
            }

            Sate = UISetting.UISate.Show;
        }
示例#4
0
    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();
        }
    }