/// <summary> /// Callback triggered when the server has acknowledge the battle results and returned /// a battle summary. /// </summary> /// <param name="data">Summary data</param> private void OnBattleSummarySuccess(BattleSummaryData data) { IsLoading = false; UIManager.OnShowLoadingView(false); // Start respawning WorldService.GetInstance().StartRespawn(LocationId); if (data.winner) { if (data.wonTheGame) { UIManager.OnShowGameVictoryView(); } else { UIManager.OnShowLootResultsDialog("Victory!", data.rewards.items); } } else { UIManager.OnShowLootResultsDialog("Defeat!", data.rewards.items); } // Hide this location until next respawn if (Model != null) { Model.SetActive(false); } }
/// <summary> /// Callback triggered when the server has acknowledge the battle results and returned /// a battle summary. /// </summary> /// <param name="data">Summary data</param> private void OnBattleSummarySuccess(BattleSummaryData data) { IsLoading = false; if (data.winner) { // The tower is gone RespawingState(); UIManager.OnShowLoadingView(false); if (data.wonTheGame) { UIManager.OnShowGameVictoryView(); } else { UIManager.OnShowLootResultsDialog("Victory!", data.rewards.items); } } else { UIManager.OnShowLootResultsDialog("Defeat!", data.rewards.items); } }