更新场景

This commit is contained in:
2025-11-13 00:17:40 +08:00
parent 5440af548e
commit f60512b540
828 changed files with 62968 additions and 1239396 deletions

View File

@@ -1,35 +0,0 @@
using System.Collections;
using UnityEngine;
namespace Obvious.Soap.Example
{
[RequireComponent(typeof(CanvasGroup))]
public class FadeOut : CacheComponent<CanvasGroup>
{
[SerializeField] private float _duration = 0.5f;
private Coroutine _coroutine = null;
public void Activate()
{
if (_coroutine != null)
StopCoroutine(_coroutine);
_coroutine = StartCoroutine(Cr_FadeOut());
}
private IEnumerator Cr_FadeOut()
{
var timer = 0f;
_component.alpha = 1f;
while (timer <= _duration)
{
_component.alpha = Mathf.Lerp(1f, 0f, timer / _duration);
timer += Time.deltaTime;
yield return null;
}
_component.alpha = 0;
}
}
}