示例#1
0
    private IEnumerator IE_ProgressGathering()
    {
        while (true)
        {
            yield return(new WaitForEndOfFrame());

            if (PlayerActManager.Instance.CurrentBehaviour == CharacterBehaviour.Death)
            {
                PlayerAnimator.SetBool(GetAnimatorParameterByResourceType(), false);
                ClosePanel();
                InteractChecker.ResetInteractAction();
                yield break;
            }
            progressValue       += PlayerStat.Instance.GetStat("GatheringPower") * Time.deltaTime;
            ProgressSlider.value = progressValue;

            if (progressValue >= currentData.HealthPoint)
            {
                PlayerAnimator.SetBool(GetAnimatorParameterByResourceType(), false);
                resourceController.EndGathering();
                ClosePanel();
                InteractChecker.ResetInteractAction();
                yield break;
            }
        }
    }