using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityStandardAssets.Vehicles.Car; public class Trigger_NonFeelCharge : Trigger_Objective { public GameObject daoHangGo; public GameObject daoHangGo1; public GameObject daoHangFrom; public override void OnTriggerEnter(Collider other) { if (other.transform.name.Contains("ColliderFront")) { base.OnTriggerEnter(other); Debug.Log("出发无感"); DrivePanel.instance.OnNonInductiveCharging(true); DrivePanels.instance.OnNonInductiveCharging(true); //DrivePanel.instance.carUser.GetComponent().enabled = false; //DrivePanel.instance.carUser.GetComponent().isKinematic = false; //car.GetComponent().isKinematic = false; } } public override void OnTriggerExit(Collider other) { if (other.transform.name.Contains("ColliderFront")) { base.OnTriggerExit(other); Debug.Log("离开无感"); DrivePanel.instance.OnNonInductiveCharging(false); DrivePanels.instance.OnNonInductiveCharging(false); //daoHangGo.SetActive(false); daoHangGo1.SetActive(false); daoHangFrom.SetActive(true); } } }