InputDeviceKSLeftClose.cs 320 B

123456789101112131415161718
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class InputDeviceKSLeftClose : MonoBehaviour
  5. {
  6. private float times = 0;
  7. private void Update()
  8. {
  9. times += Time.deltaTime;
  10. if(times>2f)
  11. {
  12. gameObject.SetActive(false);
  13. }
  14. }
  15. }