using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class CarManager : MonoBehaviour { public GameObject puncture; //爆胎 public GameObject UIl; private void OnTriggerEnter(Collider other) { if (other.name == "爆胎") { puncture.SetActive(true); UIl.SetActive(true); } } // /// // /// 爆胎 // /// // public void Puncture() // { // if (puncture.activeInHierarchy) // puncture.SetActive(false); // else // { // puncture.SetActive(true); // } // } // }