GetVehicleSpeed
Description
Declaration
public static float GetVehicleSpeed(int vehicleIndex)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);
}
public void GetVehicleSpeed()
{
Debug.Log($"Speed: {API.GetVehicleSpeed(0)} km/h");
}
}
Last updated