private void Awake() { stageViewPrefab = LoadResourceController.GetCampaignStageView(); playerCampaign = DataPlayer.GetModule <PlayerCampaign>(); campaignCollection = LoadResourceController.GetCampaignConfigCollection(); mapConfig = campaignCollection.GetMapCampaignConfigWithStageId(playerCampaign.GetLastStagePass()); }
private void Awake() { collection = LoadResourceController.GetCampaignConfigCollection(); prefab = LoadResourceController.GetCampaignModeView(); InitOrUpdateView(); }
private void CheckWinLose() { bool isWin = UnityEngine.Random.Range(0, 2) % 2 == 1; var message = isWin ? "Victory" : "Lose"; if (isWin) { var stage = DataPlayer.GetModule <PlayerCampaign>().GetLastStagePass(); { var dataNextLevel = LoadResourceController.GetCampaignConfigCollection() .GetNextStage(stage); if (dataNextLevel != null) { DataPlayer.GetModule <PlayerCampaign>().SetLastStagePass(dataNextLevel.stage); SetupData(dataNextLevel.rewards, message); } } } else { SetupData(null, message); } }
private void Awake() { mode = LoadResourceController.GetCampaignConfigCollection() .GetModeCampaignWithId(DataPlayer.GetModule <PlayerCampaign>().GetModePick()); InitOrUpdateView(mode); }