AbstractObjectHandler.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using ObjectScripts;
  5. using UnityEngine;
  6. using CSVReader;
  7. public abstract class AbstractObjectHandler : MonoBehaviour
  8. {
  9. ///<summary>
  10. /// Dicitionary to keep track of each GameObject corresponding to input.ID
  11. ///</summary>
  12. public Dictionary<int, GameObject> ObjectDictionary;
  13. ///<summary>
  14. /// Prefab EventType Human
  15. ///</summary>
  16. [SerializeField] public GameObject prefabHuman;
  17. ///<summary>
  18. /// Prefab EventType Car
  19. ///</summary>
  20. [SerializeField] public GameObject prefabCar;
  21. ///<summary>
  22. /// Prefab EventType Truck
  23. ///</summary>
  24. [SerializeField] public GameObject prefabTruck;
  25. ///<summary>
  26. /// Prefab EventType Bike
  27. ///</summary>
  28. [SerializeField] public GameObject prefabBike;
  29. ///<summary>
  30. /// Manager to get inputs to handle
  31. ///</summary>
  32. [SerializeField] public AbstractManager ManagerObject;
  33. ///<summary>
  34. /// UpdateRat: velocity/managerUpdateRate
  35. ///</summary>
  36. public float UpdateRate { get; set; }
  37. ///<summary>
  38. /// Velocity of the simulation/Game
  39. ///</summary>
  40. public float GameVelocity { get; set; }
  41. ///<summary>
  42. /// Simulation runs forward
  43. ///</summary>
  44. public bool Forward { get; set; }
  45. ///<summary>
  46. /// Method to handle the Input given by the Manager
  47. ///</summary>
  48. public abstract void Handle(List<InputObject> InputBuffer);
  49. ///<summary>
  50. /// Method to start the delete process
  51. ///</summary>
  52. public abstract void DeleteObject(DataObject dataObject);
  53. ///<summary>
  54. /// Deletes every Object
  55. ///</summary>
  56. public abstract void ClearAll();
  57. }