mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Demo
Demo
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user