15 lines
264 B
C#
15 lines
264 B
C#
using UnityEngine;
|
|
|
|
namespace OTG.Lab06.Effects
|
|
{
|
|
public sealed class SelfDestruct : MonoBehaviour
|
|
{
|
|
[SerializeField] private float lifetime = 1f;
|
|
|
|
private void Start()
|
|
{
|
|
Destroy(gameObject, lifetime);
|
|
}
|
|
}
|
|
}
|