设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

缓存插件请教

查看数: 247 | 评论数: 2 | 收藏 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2024-6-8 13:52

正文摘要:

希望那位大佬能帮忙讲下这个插件怎么使用,自己看了半天,好像没有脚本和插件指令(应该是),好像只是在插件里设置那个文件夹里的图片或音频需要缓存就可以了。 希望那位大佬帮忙看看!非常感谢! ...

回复

dumpiel 发表于 2024-6-8 21:01:57
505681468 发表于 2024-6-8 19:34
/*
* ---------------------------------------------------------------------------------
* Container ...

感谢大佬回答!不过感觉这个插件应该挺有用的···哈哈···
505681468 发表于 2024-6-8 19:34:01
本帖最后由 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")

是直接调用代码的行为,不建议新手使用
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-28 06:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表