System.touchImages

機能/意味
Loading images into the cache
タイプ
Systemクラスのメソッド
構文
touchImages(storages, limitbytes=0, timeout=0)
引数
storages  Pass the image storage name you want to put in the cache as an array (an object of the Array class).
 The one written earlier has priority.
 Kirikiri manages the cache using the character string specified in the first argument of Layer.loadImages as it is as a key. To make the cache meaningful, specify here The image storage name must be the same as the one specified in the first argument of Layer.loadImages.
limitbytes  Specifies the limit of the cache capacity to be used in calling this method in bytes.
 Specify 0 to use all of the cache.
 Specifying a positive number will attempt to use the cache up to that number of bytes.
 If you specify a negative number, the current cache limit (System.graphicCacheLimit) will be added to the number (but subtracted because it adds a "negative number"). Used as If the result is a zero or negative limit, the method exits silently. For example, specifying -2 * 1024 * 1024 is equivalent to specifying the current cache limit minus 2MB. This is useful if you want more space in the cache.
timeout  Specify the timeout (time limit) in ms. If you specify 0, there is no limit.
 After the time specified by this argument has elapsed, this method stops loading any further images and returns. However, if a timeout occurs while loading an image, it will not return until the image has finished loading.
戻り値
なし (void)
説明
 This method attempts to cache the specified image. However, although this method will try to put the image in the cache, there is no guarantee that the image will actually be in the cache. If image cache limit is exceeded or timeout occurs, image loading will be interrupted. As for the image, the first thing written in the storages parameter is more likely to be in the cache (higher priority). If the specified image is already in the cache, it will just move up in the cache.
 This method ignores any errors while loading the image.
 In the current version, images that can be cached by this method are images that can usually be loaded with Layer.loadImages and do not specify a color key (images with alpha channel are OK). The rule image of the universal transition and the area image are read, but they are not valid data as a cache (the read data will be wasted), so do not specify it.
 See System.graphicCacheLimit for the number of bytes the image uses in the cache.