This commit is contained in:
parent
d48a4abe1a
commit
a256dc33ed
|
@ -59,6 +59,7 @@ namespace BITKit
|
|||
|
||||
public static async UniTask UniTaskFunc<T0,T1,T2>(this Func<T0,T1,T2,UniTask> self,T0 arg0,T1 arg1,T2 arg2)
|
||||
{
|
||||
if(self is null)return;
|
||||
List<UniTask> tasks = new List<UniTask>();
|
||||
foreach (var func in self.CastAsFunc())
|
||||
{
|
||||
|
|
|
@ -100,6 +100,10 @@ namespace BITKit
|
|||
{
|
||||
return;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
BIT4Log.LogException(e);
|
||||
}
|
||||
currentElement.IsEntered = false;
|
||||
OnExit?.Invoke(currentElement);
|
||||
}
|
||||
|
|
|
@ -149,12 +149,13 @@ namespace BITKit.UX
|
|||
}
|
||||
isActive = true;
|
||||
}
|
||||
async UniTask IEntryElement.EntryAsync()
|
||||
public virtual async UniTask EntryAsync()
|
||||
{
|
||||
if (entryDuration.Allow is false) return;
|
||||
while (CurrentOpacity < 1 && TargetOpacity is 1)
|
||||
{
|
||||
await UniTask.NextFrame(cancellationToken);
|
||||
if(destroyCancellationToken.IsCancellationRequested)return;
|
||||
}
|
||||
}
|
||||
void IEntryElement.Entered()
|
||||
|
|
|
@ -603,6 +603,7 @@ namespace BITKit
|
|||
self.SetActive(visibleOnEmpty || result);
|
||||
return result;
|
||||
}
|
||||
public static T Get<T>(this VisualElement self ,int index = 0) where T : VisualElement => self.Q<T>($"{typeof(T).Name}--{index}");
|
||||
public static T Create<T>(this VisualElement self, string name = Constant.EmetyString) where T : VisualElement, new()
|
||||
{
|
||||
var element = new T();
|
||||
|
|
Loading…
Reference in New Issue