Project1

标题: 缓存插件请教 [打印本页]

作者: dumpiel    时间: 2024-6-8 13:52
标题: 缓存插件请教
希望那位大佬能帮忙讲下这个插件怎么使用,自己看了半天,好像没有脚本和插件指令(应该是),好像只是在插件里设置那个文件夹里的图片或音频需要缓存就可以了。
希望那位大佬帮忙看看!非常感谢!


插件下载:↓
Aetherflow_PreloadEverything.7z (5.35 KB, 下载次数: 3)
作者: 505681468    时间: 2024-6-8 19:34
本帖最后由 505681468 于 2024-6-8 19:50 编辑

JAVASCRIPT 代码复制
  1. /*
  2.  * ---------------------------------------------------------------------------------
  3.  * Containers
  4.  * ---------------------------------------------------------------------------------
  5.  * For those users who are more hands on, the caching system has a type of object
  6.  * known as a "Container". Think of this as a group of objects, that can all be cached
  7.  * together and then can all be purged together at the same time, for easy cleanup and
  8.  * management. These are not the same as containers you setup in the plugin parameters.
  9.  * These containers are only accessed and used via code.
  10.  *
  11.  * Various function exists to help with the ease and usage of containers. They are
  12.  * all well documented throughout the plugin but a brief overview of them is as follows:
  13.  *
  14.  * ImageManager/AudioManager.addContainer("containerName"): Adds a container to the
  15.  * specified resource cache for that type.
  16.  *
  17.  * ImageManager/AudioManager.addContainerItem("containerName", "itemKey"): Adds an item
  18.  * to the container. NOTE: It only adds a key to look up the item in the cache for purging,
  19.  * it does not preload or load an item for you, you will need to do that prior to adding it
  20.  * to a container.
  21.  *
  22.  * ImageManager/AudioManager.releaseContainer("containerName"): Releases all objects
  23.  * within the specified container from the cache.
  24.  *
  25.  * ImageManager/AudioManager.releaseContainerItem("containerName", "itemKey"): Releases
  26.  * the specified item from the specified container if it exists, freeing it from the
  27.  * cache.
  28. */


ImageManager.addContainer("containerName")
ImageManager.addContainerItem("containerName", "itemKey")

是直接调用代码的行为,不建议新手使用
作者: dumpiel    时间: 2024-6-8 21:01
505681468 发表于 2024-6-8 19:34
/*
* ---------------------------------------------------------------------------------
* Container ...

感谢大佬回答!不过感觉这个插件应该挺有用的···哈哈···




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1