public void OnValidate() { switch (ControllerType) { case LocationControllerType.Debug: locationController = new DebugLocationController(); break; case LocationControllerType.GPS: if (PlayerComponent != null) { locationController = new GpsLocationController(PlayerComponent.Player); } break; } }
public LocationService() { _locationController = LocationController.Instance; }