public void addLocationListener(LocationChangeListener listener) { locationListeners.Add(listener); if (!lastLocation.Equals(GPSLocation.UNDEFINED)) { Debug.LogWarning("Can already access location. Immediately firing new location on new listener"); StartCoroutine(listener.onLocationChange(lastLocation)); } }
public void removeLocationListener(LocationChangeListener listener) { bool removed = locationListeners.Remove(listener); Debug.LogError("Removed " + removed); }