import { app } from "../App";
import { Sprite } from "cc";
import { Component } from "cc";

export enum IconTypeEnum{
    品质 = "品质",
    宠物装备 = "宠物装备",
    资源 = "资源",
}

export default class TbResource {

    static loadSpriteFrame(res:string,sprite:Sprite,comp:Component){
        
        app.tbRes.loadSpriteFrame(res,sprite,comp)
    }

    //加载资源ICON
    static loadSpriteIcon(type:IconTypeEnum,id:string | number,sprite:Sprite,comp:Component){
        app.tbRes.loadSpriteFrame(`icon/${type}/${id}/spriteFrame`,sprite,comp)
    }

}

