Ejemplo n.º 1
0
    public void updateMedicineImage(MedicineVO vo)
    {
        Chip.SetActive(false);
        Full.SetActive(true);

        //TODO:后续统一从资源管理器脚本类加载预设
        //品质外框
        string frame = FullQualityPath(vo.Quality);
        string qualitypath = "ChangeIcon/ImageIcon/qualityframe/" + frame;
        FullFrame.overrideSprite = Resources.Load(qualitypath, typeof(Sprite)) as Sprite;

        //药品图标
        string cardpath = "ChangeIcon/ImageIcon/medicine/" + vo.ID;
        fullCardIcon.overrideSprite = Resources.Load(cardpath, typeof(Sprite)) as Sprite;
    }
Ejemplo n.º 2
0
    public void updateMedicineImage(MedicineVO vo)
    {
        Chip.SetActive(false);
        Full.SetActive(true);

        //TODO:后续统一从资源管理器脚本类加载预设
        //品质外框
        string frame       = FullQualityPath(vo.Quality);
        string qualitypath = "ChangeIcon/ImageIcon/qualityframe/" + frame;

        FullFrame.overrideSprite = Resources.Load(qualitypath, typeof(Sprite)) as Sprite;

        //药品图标
        string cardpath = "ChangeIcon/ImageIcon/medicine/" + vo.ID;

        fullCardIcon.overrideSprite = Resources.Load(cardpath, typeof(Sprite)) as Sprite;
    }
Ejemplo n.º 3
0
    private void Convert()
    {
        //todo:暂时写法,后续会对数据读取解析进行不断优化
        switch (mVO.goodsType)
        {
        case GoodsType.Equipment:
            var evo = new EquipmentVO();
            evo.id          = mVO.id;
            evo.own         = mVO.own;
            evo.price       = mVO.totalcost;
            evo.quality     = mVO.quality;
            evo.name        = mVO.name;
            evo.detail      = mVO.description;
            evo.extradetail = mVO.extraDescription;
            goodsCard.updateEquipImage(evo);
            break;

        case GoodsType.Medicine:
            var mvo = new MedicineVO();
            mvo.id          = mVO.id;
            mvo.own         = mVO.own;
            mvo.price       = mVO.totalcost;
            mvo.quality     = mVO.quality;
            mvo.name        = mVO.name;
            mvo.detail      = mVO.description;
            mvo.extradetail = mVO.extraDescription;
            goodsCard.updateMedicineImage(mvo);
            break;

        case GoodsType.Scroll:
            var svo = new ScrollVO();
            svo.id          = mVO.id;
            svo.own         = mVO.own;
            svo.price       = mVO.totalcost;
            svo.quality     = mVO.quality;
            svo.name        = mVO.name;
            svo.detail      = mVO.description;
            svo.extradetail = mVO.extraDescription;
            goodsCard.updateScrollImage(svo);
            break;

        case GoodsType.SoulStone:
            var ssvo = new SoulStoneVO();
            ssvo.id          = mVO.id;
            ssvo.own         = mVO.own;
            ssvo.price       = mVO.totalcost;
            ssvo.quality     = mVO.quality;
            ssvo.name        = mVO.name;
            ssvo.detail      = mVO.description;
            ssvo.extradetail = mVO.extraDescription;
            goodsCard.updateSoulStoneImage(ssvo);
            break;

        case GoodsType.Chip:
            var cvo = new ChipVO();
            cvo.type        = mVO.chiptype;
            cvo.id          = mVO.id;
            cvo.own         = mVO.own;
            cvo.price       = mVO.totalcost;
            cvo.quality     = mVO.quality;
            cvo.name        = mVO.name;
            cvo.detail      = mVO.description;
            cvo.extradetail = mVO.extraDescription;
            goodsCard.updateChipImage(cvo);
            break;
        }
    }
Ejemplo n.º 4
0
    private void Convert()
    {
        GoodsItemVO mVO = currSelectedVO;
        //todo:暂时写法,后续会对数据读取解析进行不断优化
        switch (mVO.goodsType)
        {
            case GoodsType.Equipment:
                var evo = new EquipmentVO();
                evo.id = mVO.id;
                evo.own = mVO.own;
                evo.price = mVO.totalcost;
                evo.quality = mVO.quality;
                evo.name = mVO.name;
                evo.detail = mVO.description;
                evo.extradetail = mVO.extraDescription;
                goodsCard.updateEquipImage(evo);
                break;

            case GoodsType.Medicine:
                var mvo = new MedicineVO();
                mvo.id = mVO.id;
                mvo.own = mVO.own;
                mvo.price = mVO.totalcost;
                mvo.quality = mVO.quality;
                mvo.name = mVO.name;
                mvo.detail = mVO.description;
                mvo.extradetail = mVO.extraDescription;
                goodsCard.updateMedicineImage(mvo);
                break;

            case GoodsType.Scroll:
                var svo = new ScrollVO();
                svo.id = mVO.id;
                svo.own = mVO.own;
                svo.price = mVO.totalcost;
                svo.quality = mVO.quality;
                svo.name = mVO.name;
                svo.detail = mVO.description;
                svo.extradetail = mVO.extraDescription;
                goodsCard.updateScrollImage(svo);
                break;

            case GoodsType.SoulStone:
                var ssvo = new SoulStoneVO();
                ssvo.id = mVO.id;
                ssvo.own = mVO.own;
                ssvo.price = mVO.totalcost;
                ssvo.quality = mVO.quality;
                ssvo.name = mVO.name;
                ssvo.detail = mVO.description;
                ssvo.extradetail = mVO.extraDescription;
                goodsCard.updateSoulStoneImage(ssvo);
                break;

            case GoodsType.Chip:
                var cvo = new ChipVO();
                cvo.type = mVO.chiptype;
                cvo.id = mVO.id;
                cvo.own = mVO.own;
                cvo.price = mVO.totalcost;
                cvo.quality = mVO.quality;
                cvo.name = mVO.name;
                cvo.detail = mVO.description;
                cvo.extradetail = mVO.extraDescription;
                goodsCard.updateChipImage(cvo);
                break;
        }
    }