custom-chatbot / data /SelfDestroy.cs
fastx's picture
Upload 84 files
ac55997
raw
history blame
238 Bytes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SelfDestroy : MonoBehaviour
{
public float TTL = 2;
void Update()
{
if (TTL < 0) Destroy(gameObject);
TTL -= Time.deltaTime;
}
}