Files
TEngine/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEffect.cs
ALEXTANG 7bf081269c Demo
Demo
2023-05-13 11:57:11 +08:00

21 lines
360 B
C#

using UnityEngine;
using UniFramework.Pooling;
public class EntityEffect : MonoBehaviour
{
public float DelayDestroyTime = 1f;
private SpawnHandle _handle;
public void InitEntity(SpawnHandle handle)
{
_handle = handle;
Invoke(nameof(DelayDestroy), DelayDestroyTime);
}
private void DelayDestroy()
{
_handle.Restore();
_handle = null;
}
}