Beispiel #1
0
    //协程
    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);
                }
            }
        }
    }
Beispiel #2
0
    //协程
    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);
                }
            }
        }
    }
Beispiel #3
0
    //协程
    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);
                }
            }
        }
    }