mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
21 lines
360 B
C#
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;
|
|
}
|
|
} |