38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
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<Animator>().enabled = false;
|
|
//DrivePanel.instance.carUser.GetComponent<Rigidbody>().isKinematic = false;
|
|
//car.GetComponent<Rigidbody>().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);
|
|
}
|
|
}
|
|
}
|