Exemplo n.º 1
0
    private void ParseMissions(List <SlgPB.Mission> missions, out SlgPB.Mission lastNormalMission, out SlgPB.Mission lastEliteMission)
    {
        lastNormalMission = null;
        lastEliteMission  = null;

        foreach (SlgPB.Mission mission in missions)
        {
            Model_Mission modelMission = new Model_Mission(mission.missonId);
            modelMission.Parse(mission);

//			modelMission.referenceMission = DataManager.instance.dataMissionGroup.GetMission(modelMission.missionId);
//			Assert.assert(modelMission.referenceMission != null);

            ReplaceMission(modelMission);

            if (modelMission.starCount > 0)
            {
                if (modelMission.difficulty == DataConfig.MISSION_DIFFICULTY.NORMAL)
                {
                    lastNormalMission = mission;
                }
                else if (modelMission.difficulty == DataConfig.MISSION_DIFFICULTY.ELITE)
                {
                    lastEliteMission = mission;
                }
            }
        }
    }
Exemplo n.º 2
0
    public void Parse(SlgPB.Mission m)
    {
        starMask        = m.star;
        _remainFightNum = m.remainFightNum;

        actived = true;
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        if (!GameOffine.START_OF_OFFLINE)
        {
            DataManager.instance.InitData();

            Model_User model_User = InstancePlayer.instance.model_User;

            // 创建mission 数据
            DataMission[]        allMissions = DataManager.instance.dataMissionGroup.GetAllMissions();
            List <SlgPB.Mission> list        = new List <SlgPB.Mission> ();
            foreach (DataMission dataMission in allMissions)
            {
                SlgPB.Mission mission = new SlgPB.Mission();
                mission.missonId       = dataMission.magicId;
                mission.remainFightNum = 50;
                mission.star           = 7;
                list.Add(mission);
            }
            model_User.model_level.Init(list);

            //  创建user数据
            DataPersistent.Init(0xcdcdcd);
        }

        START_OF_OFFLINE = true;

        int magicId = InstancePlayer.instance.missionMagicId;

        UIDataStatus.STATE page = InstancePlayer.instance.uiDataStatus.state;
        switch (page)
        {
        case UIDataStatus.STATE.CAMPAIGN:
            UIController.instance.CreatePanel(UICommon.UI_PANEL_CAMPAIGN, magicId);
            break;

        case UIDataStatus.STATE.MISSION:
            UIController.instance.CreatePanel(UICommon.UI_PANEL_CAMPAIGN, magicId);
            UIController.instance.CreatePanel(UICommon.UI_PANEL_MISSION, magicId);
            break;
        }
    }