|
|
|
|
|
|
private void Start() |
|
|
|
{ |
|
|
|
_hasSaveData = saveSystem.LoadSaveDataFromDisk(); |
|
|
|
|
|
|
|
if (_hasSaveData) |
|
|
|
{ |
|
|
|
startText.text = "Continue"; |
|
|
|
|
|
|
{ |
|
|
|
if (!_hasSaveData) |
|
|
|
{ |
|
|
|
saveSystem.WriteEmptySaveFile(); |
|
|
|
//Start new game
|
|
|
|
onPlayButtonPress.RaiseEvent(locationsToLoad, showLoadScreen); |
|
|
|
} |
|
|
|
|
|
|
if (asyncOperationHandle.Status == AsyncOperationStatus.Succeeded) |
|
|
|
{ |
|
|
|
var locationSo = asyncOperationHandle.Result; |
|
|
|
onPlayButtonPress.RaiseEvent(new[] { (GameSceneSO)locationSo }, showLoadScreen); |
|
|
|
onPlayButtonPress.RaiseEvent(new[] {(GameSceneSO)locationSo}, showLoadScreen); |
|
|
|
} |
|
|
|
} |
|
|
|
} |