CarHandler.cs 955 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace TrafficSimulation{
  5. public class CarHandler : MonoBehaviour
  6. {
  7. public TrafficSystem trafficSystem;
  8. [Header("Player Settings")]
  9. public GameObject Bike;
  10. [Tooltip("Radius around the player to spawn cars")]
  11. [Range(5,30)]
  12. public int actionRadius;
  13. [Header("Car Settings")]
  14. [Range(1,10)]
  15. public int trafficDensity;
  16. [Tooltip("You can define presets for intersections to trigger, if the player is reaching the Intersection")]
  17. public List<GameObject> intersectionPresets;
  18. [Tooltip("List of cars to spawn")]
  19. public List<GameObject> carPrefabs;
  20. // Start is called before the first frame update
  21. void Start()
  22. {
  23. }
  24. // Update is called once per frame
  25. void Update()
  26. {
  27. }
  28. }
  29. }