Files
BH3/Assets/Scripts/Assembly-CSharp/MonoDestroyInTime.cs
2025-08-13 09:26:42 +08:00

23 lines
283 B
C#

using UnityEngine;
public class MonoDestroyInTime : MonoBehaviour
{
public float time;
private float _timer;
private void Start()
{
_timer = time;
}
private void Update()
{
_timer -= Time.deltaTime;
if (_timer <= 0f)
{
Object.Destroy(base.gameObject);
}
}
}