22 lines
494 B
C#
22 lines
494 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Beyond
|
|
{
|
|
public class SimpleDisabler : MonoBehaviour
|
|
{
|
|
public float disableTime = 0.5f;
|
|
private float currentTime = 0f;
|
|
|
|
// Update is called once per frame
|
|
private void Update()
|
|
{
|
|
currentTime += Time.deltaTime;
|
|
if (currentTime > disableTime)
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
} |