import UIView , { UIClass } from "../ui/UIView" ; description export enum ResourceCacheStatus { description NONE , description WAITTING_FOR_RELEASE } description export enum ResourceType { description Local , description Remote } description export class ResourceInfo { url : string = "" ; type : typeof cc . Asset = null ; data : cc . Asset = null ; assetUrl : string = "" ; description retain : boolean = false ; bundle : BUNDLE_TYPE = null ; } export class ResourceCacheData { description url : string = "" ; description isLoaded : boolean = false ; description data : cc . Asset = null ; description assetType : typeof cc . Asset = null ; status = ResourceCacheStatus . NONE ; bundle : BUNDLE_TYPE = null ; description getCb : ( ( data : any ) => void ) [ ] = [ ] ; description finishCb : ( ( data : any ) => void ) [ ] = [ ] ; description resourceType : ResourceType = ResourceType . Local ; public doGet ( data ) { for ( let i = 0 ; i < this . getCb . length ; i ++ ) { if ( this . getCb [ i ] ) this . getCb [ i ] ( data ) ; } this . getCb = [ ] ; } public doFinish ( data ) { for ( let i = 0 ; i < this . finishCb . length ; i ++ ) { if ( this . finishCb [ i ] ) this . finishCb [ i ] ( data ) ; } this . finishCb = [ ] ; } } export interface ResourceData { description url ? : string ; description type ? : typeof cc . Asset ; description preloadView ? : UIClass < UIView > ; bundle ? : BUNDLE_TYPE ; } description export enum ViewStatus { description WAITTING_CLOSE , description WATITING_HIDE , description WAITTING_NONE } export type BUNDLE_TYPE = string | cc . AssetManager . Bundle ; export const BUNDLE_RESOURCES = 'resources' ; export const BUNDLE_REMOTE = "__Remote__Caches__" ; description export const ENABLE_CHANGE_LANGUAGE = true ; description export const USING_LAN_KEY = "i18n." ; description export const USING_LITTLE_ENDIAN = false ;