19 lines
287 B
C#
19 lines
287 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AutoDisable : MonoBehaviour
|
|
{
|
|
int t;
|
|
private void Update()
|
|
{
|
|
t++;
|
|
|
|
if (t > 5)
|
|
{
|
|
t = 0;
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|