| 10 | * @category Resources |
| 11 | */ |
| 12 | export interface ResourceManager { |
| 13 | /** |
| 14 | * Load the specified resource. |
| 15 | * |
| 16 | * This method will be run during the game. It should only do light tasks |
| 17 | * like file downloading. |
| 18 | */ |
| 19 | loadResource(resourceName: string): Promise<void>; |
| 20 | |
| 21 | /** |
| 22 | * Process the specified resource. |
| 23 | * |
| 24 | * This method will only be run while loading screen is shown. It can do |
| 25 | * heavy tasks like parsing data. |
| 26 | */ |
| 27 | processResource(resourceName: string): Promise<void>; |
| 28 | |
| 29 | /** |
| 30 | * Return the kind of resources handled by this manager. |
| 31 | */ |
| 32 | getResourceKinds(): Array<ResourceKind>; |
| 33 | |
| 34 | /** |
| 35 | * Clear all resources, data, loaders stored by this manager. |
| 36 | * Using the manager after calling this method is undefined behavior. |
| 37 | */ |
| 38 | dispose(): void; |
| 39 | |
| 40 | /** |
| 41 | * Clear any data in cache for a resource. Embedded resources are also |
| 42 | * cleared. |
| 43 | * |
| 44 | * Usually called when scene resources are unloaded. |
| 45 | * |
| 46 | * @param resourceData The resource to clear |
| 47 | */ |
| 48 | unloadResource(resourceData: ResourceData): void; |
| 49 | } |
| 50 | } |
no outgoing calls
no test coverage detected