ClearPathForSpecialVehicles
Description
Declaration
public static void ClearPathForSpecialVehicles(bool active, RoadSide side)Parameters
Name
Description
Example
using Gley.TrafficSystem;
using UnityEngine;
public class Test : MonoBehaviour
{
//a reference to vehicle pool and player assigned in inspector
public VehiclePool vehiclePool;
public Transform player;
void Start()
{
API.Initialize(player, 20, vehiclePool);
}
//called when a special vehicle is closed
public void ClearPath()
{
API.ClearPathForSpecialVehicles(true, RoadSide.Right);
}
//resume normal driving
public void DriveNormally()
{
API.ClearPathForSpecialVehicles(false, RoadSide.Right);
}
}Last updated