using UnityEngine; using UnityEngine.UI; namespace ET { public class UiLoadingComponentAwakeSystem : AwakeSystem { public override void Awake(UILoadingComponent self) { self.text = self.GetParent().GameObject.Get("Text").GetComponent(); } } public class UiLoadingComponentStartSystem : StartSystem { public override void Start(UILoadingComponent self) { StartAsync(self).Coroutine(); } public async ETVoid StartAsync(UILoadingComponent self) { TimerComponent timerComponent = Game.Scene.GetComponent(); long instanceId = self.InstanceId; while (true) { await timerComponent.WaitAsync(1000); if (self.InstanceId != instanceId) { return; } } } } }