GetPriorityCrossingStopState

Description

Get the stop state of a crossing.

Declaration

public static bool GetPriorityCrossingStopState(string crossingName)

Parameters

Returns

bool - true -> vehicles will stop.

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);
    }

    void GetCrossingState()
    {
        Debug.Log(API.GetPriorityCrossingStopState("Crossing_2"));
    }
}

Last updated