//协程 private async void Coroutine() { while (true) { if (IsDisposed) { break; } await TimeHelper.WaitAsync(100); if (CanReplyHealth) { if (OwnerEntity.CurrentHealth.Percent() < 1f) { HealthReplyTimer.UpdateAsRepeat(0.1f, ReplyHealth); } } } }
//协程 private async void Coroutine() { while (true) { if (IsDisposed) { break; } await ET.TimerComponent.Instance.WaitAsync(100); if (CanReplyHealth) { if (AbilityOwner.CurrentHealth.Percent() < 1f) { HealthReplyTimer.UpdateAsRepeat(0.1f, ReplyHealth); } } } }
//协程 private async void Coroutine() { while (true) { if (IsDispose) { break; } await Task.Delay(100); if (CanReplyHealth) { if (AbilityOwner.CurrentHealth.Percent() < 1f) { HealthReplyTimer.UpdateAsRepeat(0.1f, ReplyHealth); } } } }