import { ResDestroyArray , ResLoadGroupManager } from "../../framework" ; /**
 * 游戏资源管理类
 *
 * 资源加载等等
 */ export class GameResManager { /**
     * lib下的资源
     */ public static GROUP_NAME_LIB = "lib" ; /**
     * 游戏内的资源
     */ public static GROUP_NAME_GAME = "game" ; /**
     * 临时资源
     */ public static GROUP_NAME_TEMP = "temp" ; /**
     * 不销毁的类型
     *
     * 如  noDestroyTypes里有  spine  则不会销毁spine
     */ public static get noDestroyTypes ( ) : ResDestroyArray < string > { return ResLoadGroupManager . noDestroyTypes ; } param name public static getRes ( name ) { return ResLoadGroupManager . getRes ( name ) ; } param resInfos public static initResInfo ( ... resInfos ) { resInfos . forEach ( ( info ) => ResLoadGroupManager . putResInfo ( info . name , info . url , info . type , info . param ) ) ; } /**
     * 获取当前全部的组
     */ public static getGroups ( ) { return ResLoadGroupManager . getGroups ( ) ; } param res param onProcess param onComplete public static loadLib ( res , onProcess ? , onComplete ? ) { GameResManager . loadGroup ( res , GameResManager . GROUP_NAME_LIB , onProcess , onComplete ) ; } param res param onProcess param onComplete public static loadGame ( res , onProcess ? , onComplete ? ) { GameResManager . loadGroup ( res , GameResManager . GROUP_NAME_GAME , onProcess , onComplete ) ; } param res param onProcess param onComplete public static loadTemp ( res , onProcess ? , onComplete ? ) { GameResManager . loadGroup ( res , GameResManager . GROUP_NAME_TEMP , onProcess , onComplete ) ; } param res param group param onProcess param onComplete public static loadGroup ( res , group , onProcess ? , onComplete ? ) { ResLoadGroupManager . loadResNameArr ( res , group , onProcess , onComplete ) ; } param type public static destroyOtherRes ( type ? ) { ResLoadGroupManager . destroyOtherRes ( type ) ; } param type public static destroyRes ( res ) { ResLoadGroupManager . destroyRes ( res ) ; } param type param plug public static destroyResType ( type , plug ? ) { ResLoadGroupManager . destroyResType ( type , plug ) ; } param group param isGDALL public static destroyGroup ( group , isGDALL ? ) { ResLoadGroupManager . destroyGroup ( group , isGDALL ) ; } param isGDALL public static destroyLib ( isGDALL ? ) { GameResManager . destroyGroup ( GameResManager . GROUP_NAME_LIB , isGDALL ) ; } param isGDALL public static destroyGame ( isGDALL ? ) { GameResManager . destroyGroup ( GameResManager . GROUP_NAME_GAME , isGDALL ) ; } param isGDALL public static destroyTemp ( isGDALL ? ) { GameResManager . destroyGroup ( GameResManager . GROUP_NAME_TEMP , isGDALL ) ; } }