private void CacheLoadLocations(GameSceneSO[] locationsToLoad, bool showLoadingScreen) { LocationSO locationSo = locationsToLoad[0] as LocationSO; if (locationSo) { saveData._locationId = locationSo.DescId.uuid; } }
private void CacheLoadLocations(GameSceneSO locationsToLoad, bool showLoadingScreen) { LocationSO locationSO = locationsToLoad as LocationSO; if (locationSO) { saveData._locationId = locationSO.Guid; } SaveDataToDisk(); }
public void Teleport(LocationSO where, PathSO whichEntrance) { //Avoid reloading the same Location, which would result in an error if (where == _lastLocationTeleportedTo) { return; } _path.lastPathTaken = whichEntrance; _lastLocationTeleportedTo = where; _loadLocationRequest.RaiseEvent(where); }
IEnumerator LoadSaveGame() { yield return(StartCoroutine(_saveSystem.LoadSavedInventory())); var locationGuid = _saveSystem.saveData._locationId; var asyncOperationHandle = Addressables.LoadAssetAsync <LocationSO>(locationGuid); yield return(asyncOperationHandle); if (asyncOperationHandle.Status == AsyncOperationStatus.Succeeded) { LocationSO locationSO = asyncOperationHandle.Result; _startGameEvent.RaiseEvent(locationSO, _showLoadScreen); } }
// ------------------------------------------------------------------------ public void OpenLocation(LocationSO locationSO, Transform target) { if (_zoomIn || _zoomOut) { return; } Vector3 targetDistance = transform.position - target.position; _moveSpeed = targetDistance / CameraZoomDuration; _moveSpeed.z = 0; ActiveLocation = locationSO; //StartCameraZoom(); _selectedSprite = target; Debug.Log(_selectedSprite); ScaleAndMoveLocation(); DisableMapIcons(); }