|
@@ -34,7 +34,7 @@ namespace TrafficSimulation{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public GameObject getCar(){
|
|
|
+ public GameObject GetCar(){
|
|
|
foreach(GameObject car in pooledCars){
|
|
|
if(!car.activeInHierarchy){
|
|
|
return car;
|
|
@@ -48,7 +48,7 @@ namespace TrafficSimulation{
|
|
|
}
|
|
|
public GameObject SpawnCar(Vector3 spawnPos, Quaternion spawnRot, Transform lookAt)
|
|
|
{
|
|
|
- GameObject car = this.getCar();
|
|
|
+ GameObject car = this.GetCar();
|
|
|
if (car == null)
|
|
|
{
|
|
|
Debug.Log("No car was available. Spawn aborted");
|
|
@@ -63,7 +63,7 @@ namespace TrafficSimulation{
|
|
|
car.SetActive(true);
|
|
|
return car;
|
|
|
}
|
|
|
- public void despawnCar(GameObject car){
|
|
|
+ public void DespawnCar(GameObject car){
|
|
|
car.SetActive(false);
|
|
|
}
|
|
|
}
|