コード例 #1
0
 private void Awake()
 {
     stageViewPrefab    = LoadResourceController.GetCampaignStageView();
     playerCampaign     = DataPlayer.GetModule <PlayerCampaign>();
     campaignCollection = LoadResourceController.GetCampaignConfigCollection();
     mapConfig          = campaignCollection.GetMapCampaignConfigWithStageId(playerCampaign.GetLastStagePass());
 }
コード例 #2
0
    private void Awake()
    {
        collection = LoadResourceController.GetCampaignConfigCollection();
        prefab     = LoadResourceController.GetCampaignModeView();


        InitOrUpdateView();
    }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
 private void Awake()
 {
     mode = LoadResourceController.GetCampaignConfigCollection()
            .GetModeCampaignWithId(DataPlayer.GetModule <PlayerCampaign>().GetModePick());
     InitOrUpdateView(mode);
 }