27 lines
773 B
C#
27 lines
773 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityStandardAssets.Vehicles.Car;
|
|
public class Trigger_Road : Trigger_Objective
|
|
{
|
|
public override void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.transform.name.Contains("ColliderFront"))
|
|
{
|
|
base.OnTriggerEnter(other);
|
|
DrivePanel.instance.OnNormalCharging(true);
|
|
DrivePanels.instance.OnNormalCharging(true);
|
|
}
|
|
}
|
|
|
|
public override void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.transform.name.Contains("ColliderFront"))
|
|
{
|
|
base.OnTriggerExit(other);
|
|
DrivePanel.instance.OnNormalCharging(false);
|
|
DrivePanels.instance.OnNormalCharging(false);
|
|
}
|
|
}
|
|
}
|