CutePet/Assets/Scripts/GameScene/Object/DelayRemove.cs

17 lines
278 B
C#
Raw Normal View History

2024-10-25 11:10:04 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DelayRemove : MonoBehaviour
{
void OnEnable()
{
Invoke("Remove",0.5f);
}
private void Remove()
{
PoolMgr.Instance.PushObj(this.gameObject);
}
}