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

Project1

 找回密码
 注册会员
搜索
查看: 147|回复: 2
打印 上一主题 下一主题

[有事请教] 缓存插件请教

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4366
在线时间
289 小时
注册时间
2021-2-9
帖子
62
跳转到指定楼层
1
发表于 2024-6-8 13:52:10 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

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


插件下载:↓
Aetherflow_PreloadEverything.7z (5.35 KB, 下载次数: 2)

Lv2.观梦者

梦石
0
星屑
938
在线时间
423 小时
注册时间
2012-4-8
帖子
260
2
发表于 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")

是直接调用代码的行为,不建议新手使用
pokemon 和 digimon 正在路上
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4366
在线时间
289 小时
注册时间
2021-2-9
帖子
62
3
 楼主| 发表于 2024-6-8 21:01:57 | 只看该作者
505681468 发表于 2024-6-8 19:34
/*
* ---------------------------------------------------------------------------------
* Container ...

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

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-6-18 21:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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