Esempio n. 1
0
 public void setupIcon(MasterDataUseItem _itemMaster)
 {
     MasterDataUtil.GetItemIcon(
         _itemMaster,
         sprite =>
     {
         IconImage = sprite;
     });
 }
Esempio n. 2
0
    public DropIconContex(MasterDataUseItem itemMaster, Sprite _rare, DropIconListItemModel listItemModel)
    {
        m_model = listItemModel;

        MasterDataUtil.GetItemIcon(
            itemMaster,
            sprite =>
        {
            ItemImage = sprite;
        });
        RareImage       = _rare;
        IsViewRareImage = true;
        CaptionText     = "";
    }
Esempio n. 3
0
    // アイコンのSpriteを返却 MasterDataDefineLabel.PointShopType版
    // いずれ他の物と統合すべき
    private void image(System.Action <Sprite> callback)
    {
        // アイコン設定
        switch (Product.product_type)
        {
        case MasterDataDefineLabel.PointShopType.NONE:
            callback(ResourceManager.Instance.Load(DefaultSpriteName));
            break;

        case MasterDataDefineLabel.PointShopType.MONEY:
            callback(ResourceManager.Instance.Load("coin_icon", ResourceType.Common));
            break;

        case MasterDataDefineLabel.PointShopType.FP:
            callback(ResourceManager.Instance.Load("friend_point_icon", ResourceType.Common));
            break;

        case MasterDataDefineLabel.PointShopType.UNIT:
        case MasterDataDefineLabel.PointShopType.UNIT_EVOL:
        case MasterDataDefineLabel.PointShopType.UNIT_BUILDUP:
        case MasterDataDefineLabel.PointShopType.UNIT_LINK:
            UnitIconImageProvider.Instance.Get(
                (uint)Product.product_param2,
                sprite =>
            {
                callback(sprite);
            });
            break;

        case MasterDataDefineLabel.PointShopType.TICKET:
            callback(ResourceManager.Instance.Load("casino_ticket", ResourceType.Common));
            break;

        case MasterDataDefineLabel.PointShopType.SCRATCH:
            callback(ResourceManager.Instance.Load(DefaultSpriteName));
            break;

        case MasterDataDefineLabel.PointShopType.ITEM:
        {
            MasterDataUtil.GetItemIcon(
                (uint)Product.product_param1,
                sprite =>
                {
                    callback(sprite);
                });
        }
        break;

        case MasterDataDefineLabel.PointShopType.LIMITOVER:
            callback(ResourceManager.Instance.Load("mm_limit_over"));
            break;

        case MasterDataDefineLabel.PointShopType.QUEST_KEY:
            callback(ResourceManager.Instance.Load("mm_quest_key"));
            break;

        default:
            callback(ResourceManager.Instance.Load(DefaultSpriteName));
            break;
        }
    }