示例#1
0
    void AddProperties()
    {
        usingHealthPack = 0;
        if (DataUtils.modeSelected == 0)
        {
            totalDropCoin = (int)DataController.instance.allMission[DataParam.indexStage].missionData[DataParam.indexMap].totaldropcoin;
        }
        else
        {
            totalDropCoin = (int)(DataController.instance.allMission[DataParam.indexStage].missionData[DataParam.indexMap].totaldropcoin * 1.5f);
        }
        if (currentMap.haveMiniBoss)
        {
            totalDropCoin -= 8;
        }
        if (currentMap.haveBoss)
        {
            totalDropCoin -= 15;
        }
        uiPanel.Begin();

        for (int i = 0; i < MissionController.Instance.listMissions.Count; i++)
        {
            MissionController.Instance.listMissions[i].currentValue = 0;
            MissionController.Instance.listMissions[i].isDone       = false;
        }
        vatphamnhanduoc.Clear();


        if (DataUtils.modeSelected == 0)
        {
            if (DataParam.indexStage == 0)
            {
                first = !DataUtils.GetMapByIndex(DataParam.indexStage, DataParam.indexMap).hasComplete;
            }
            else
            {
                first = false;
            }
            for (int i = 0; i < DataController.instance.allTileVatPham[DataParam.indexStage].tilevatphamList.Count; i++)
            {
                if (DataController.instance.allTileVatPham[DataParam.indexStage].tilevatphamList[i].Level == DataParam.indexMap + 1)
                {
                    vatphamnhanduoc.Add(DataController.instance.allTileVatPham[DataParam.indexStage].tilevatphamList[i]);
                }
            }
        }
        else
        {
            first = false;
            for (int i = 0; i < DataController.instance.allTileVatPhamHard[DataParam.indexStage].tilevatphamList.Count; i++)
            {
                if (DataController.instance.allTileVatPhamHard[DataParam.indexStage].tilevatphamList[i].Level == DataParam.indexMap + 1)
                {
                    vatphamnhanduoc.Add(DataController.instance.allTileVatPhamHard[DataParam.indexStage].tilevatphamList[i]);
                }
            }
        }
    }