示例#1
0
    public Model_Mission GetMission(int missionMagicId)
    {
        DataConfig.MISSION_DIFFICULTY difficulty = DataMission.GetDifficulty(missionMagicId);
        int stageId   = DataMission.GetStageId(missionMagicId);
        int missionId = DataMission.GetMissionId(missionMagicId);

        return(GetMission(difficulty, stageId, missionId));
    }
示例#2
0
    public void UpdatetileUI(int missionMagicId)
    {
        int missionId = DataMission.GetMissionId(missionMagicId);

        int tileIndex = missionId - 1;

        if (tileIndex >= 0)
        {
            mapControl.SelectTile(tileIndex);
        }
    }
示例#3
0
    public bool IsMissionUnlock(int magicId)
    {
        int stageId = DataMission.GetStageId(magicId);

        DataConfig.MISSION_DIFFICULTY difficulty = DataMission.GetDifficulty(magicId);
        int missionId = DataMission.GetMissionId(magicId);

        Model_Mission model_Mission = GetMission(difficulty, stageId, missionId);
        bool          isUnlcok      = model_Mission.actived;

        return(isUnlcok);
    }
示例#4
0
    /*
     * public Model_Mission(DataConfig.MISSION_DIFFICULTY difficulty, int stageId, int missionId)
     * {
     *      magicId = (int)(difficulty + 1) * 10000 + stageId * 100 + missionId;
     *
     *      this.difficulty = difficulty;
     *      this.stageId = stageId;
     *      this.missionId = missionId;
     *
     *      InitRemainFightNum ();
     * }
     */

    public Model_Mission(int magicId)
    {
        this.magicId = magicId;

        difficulty = DataMission.GetDifficulty(magicId);
        stageId    = DataMission.GetStageId(magicId);
        missionId  = DataMission.GetMissionId(magicId);

        InitRemainFightNum();

        _referenceMission = DataManager.instance.dataMissionGroup.GetMission(magicId);
        Assert.assert(_referenceMission != null);
    }
示例#5
0
    public void TryUnlockEliteFirstMission(int battleMissionId)
    {
        Assert.assert(DataMission.GetDifficulty(battleMissionId) == DataConfig.MISSION_DIFFICULTY.NORMAL);

        DataConfig.MISSION_DIFFICULTY difficulty = DataConfig.MISSION_DIFFICULTY.ELITE;
        int stageId   = DataMission.GetStageId(battleMissionId);
        int missionId = DataMission.GetMissionId(battleMissionId);

        Campaign campaign = GetCampaign(difficulty, stageId);

        if (campaign.list.Count == missionId)
        {
            Model_Mission mission = GetMission(difficulty, stageId, 1);
            mission.actived = true;
        }
    }
示例#6
0
    public void UpdatePageUI(int missionMagicId)
    {
        FreeMapControl();

        DataConfig.MISSION_DIFFICULTY difficulty = DataMission.GetDifficulty(missionMagicId);
        int stageId   = DataMission.GetStageId(missionMagicId);
        int missionId = DataMission.GetMissionId(missionMagicId);

        // TODO 强制战役背景资源 ID 为1
//		stageId = 1;

        DataMissionGroup.DataCampaign campaign = DataManager.instance.dataMissionGroup.GetCampaign(difficulty, stageId);
        mapControl = new CampaignMapControl(campaign, missionId - 1);

        int tileIndex = missionId - 1;

        if (tileIndex >= 0)
        {
            mapControl.SelectTile(tileIndex);
        }
    }