mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 09:08:23 -05:00
21 lines
356 B
C#
21 lines
356 B
C#
using UnityEngine;
|
|
using UnityEngine.Assertions;
|
|
using UnityAtoms.BaseAtoms;
|
|
|
|
public class DestroyMe : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
FloatReference _delay;
|
|
|
|
void Start()
|
|
{
|
|
Assert.IsNotNull(_delay);
|
|
Destroy(gameObject, _delay.Value);
|
|
}
|
|
|
|
public void DestroyImmediate()
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|