public async Task ReturnToBaseAsync() { attackStarted.Raise(); var baseDescription = await playerBaseProvider.GetPlayerBase(playerData.Id, false); await Scenes.UnloadScenes(); await Scenes.LoadPlayerScene(); currentGameState.Value = defaultState; await baseBuilder.BuildBase(baseDescription); attackFinished.Raise(); }
private async void Start() { if (enableTutorial) { Tutorials.TutorialUtility.IsDebugMode = true; Tutorials.TutorialUtility.SetTutorialRunning(true); } await playerData.Init(); var baseDescription = await baseProvider.GetPlayerBase(playerData.Id, false); if (!baseDescription.isPersistant) { await InitNewPlayer(baseDescription); } await Scenes.LoadPlayerScene(); currentGameState.Value = defaultGameState; await baseBuilder.BuildBase(baseDescription); }