Files
2026-02-21 16:45:37 +08:00

23 lines
303 B
C#

using UnityEngine;
public class DieTimer : MonoBehaviour
{
public float SecondsToDie = 10f;
private float m_fTimer;
private void Start()
{
m_fTimer = 0f;
}
private void Update()
{
m_fTimer += Time.deltaTime;
if (m_fTimer > SecondsToDie)
{
Object.Destroy(base.gameObject);
}
}
}