Skip to content

ImageManager() ​

ImageManager - 图像管理器

这是一个静态类,用于管理游戏中的图像资源,包括角色、敌人、背景、
系统图片等的加载、缓存和预处理。

This is a static class that manages image resources in the game, including
loading, caching and preprocessing of characters, enemies, backgrounds,
system images, etc.

Kind: global function

  • ImageManager()
    • ._generateCacheKey(path, hue) ⇒ string
    • .loadAnimation(filename, hue) ⇒ Bitmap
    • .loadBattleback1(filename, hue) ⇒ Bitmap
    • .loadBattleback2(filename, hue) ⇒ Bitmap
    • .loadEnemy(filename, hue) ⇒ Bitmap
    • .loadCharacter(filename, hue) ⇒ Bitmap
    • .loadFace(filename, hue) ⇒ Bitmap
    • .loadParallax(filename, hue) ⇒ Bitmap
    • .loadPicture(filename, hue) ⇒ Bitmap
    • .loadSvActor(filename, hue) ⇒ Bitmap
    • .loadSvEnemy(filename, hue) ⇒ Bitmap
    • .loadSystem(filename, hue) ⇒ Bitmap
    • .loadTileset(filename, hue) ⇒ Bitmap
    • .loadTitle1(filename, hue) ⇒ Bitmap
    • .loadTitle2(filename, hue) ⇒ Bitmap
    • .loadBitmap(folder, filename, hue, smooth) ⇒ Bitmap
    • .loadEmptyBitmap() ⇒ Bitmap
    • .loadNormalBitmap(path, hue) ⇒ Bitmap
    • .clear()
    • .isReady() ⇒ boolean
    • .isObjectCharacter(filename) ⇒ boolean
    • .isBigCharacter(filename) ⇒ boolean
    • .isZeroParallax(filename) ⇒ boolean
    • .reserveAnimation(filename, hue, reservationId) ⇒ Bitmap
    • .reserveBattleback1(filename, hue, reservationId) ⇒ Bitmap
    • .reserveBattleback2(filename, hue, reservationId) ⇒ Bitmap
    • .reserveEnemy(filename, hue, reservationId) ⇒ Bitmap
    • .reserveCharacter(filename, hue, reservationId) ⇒ Bitmap
    • .reserveFace(filename, hue, reservationId) ⇒ Bitmap
    • .reserveParallax(filename, hue, reservationId) ⇒ Bitmap
    • .reservePicture(filename, hue, reservationId) ⇒ Bitmap
    • .reserveSvActor(filename, hue, reservationId) ⇒ Bitmap
    • .reserveSvEnemy(filename, hue, reservationId) ⇒ Bitmap
    • .reserveSystem(filename, hue, reservationId) ⇒ Bitmap
    • .reserveTileset(filename, hue, reservationId) ⇒ Bitmap
    • .reserveTitle1(filename, hue, reservationId) ⇒ Bitmap
    • .reserveTitle2(filename, hue, reservationId) ⇒ Bitmap
    • .reserveBitmap(folder, filename, hue, smooth, reservationId) ⇒ Bitmap
    • .reserveNormalBitmap(path, hue, reservationId) ⇒ Bitmap
    • .releaseReservation(reservationId)
    • .setDefaultReservationId(reservationId)
    • .requestAnimation(filename, hue) ⇒ Bitmap
    • .requestBattleback1(filename, hue) ⇒ Bitmap
    • .requestBattleback2(filename, hue) ⇒ Bitmap
    • .requestEnemy(filename, hue) ⇒ Bitmap
    • .requestCharacter(filename, hue) ⇒ Bitmap
    • .requestFace(filename, hue) ⇒ Bitmap
    • .requestParallax(filename, hue) ⇒ Bitmap
    • .requestPicture(filename, hue) ⇒ Bitmap
    • .requestSvActor(filename, hue) ⇒ Bitmap
    • .requestSvEnemy(filename, hue) ⇒ Bitmap
    • .requestSystem(filename, hue) ⇒ Bitmap
    • .requestTileset(filename, hue) ⇒ Bitmap
    • .requestTitle1(filename, hue) ⇒ Bitmap
    • .requestTitle2(filename, hue) ⇒ Bitmap
    • .requestBitmap(folder, filename, hue, smooth) ⇒ Bitmap
    • .requestNormalBitmap(path, hue) ⇒ Bitmap
    • .update()
    • .clearRequest()

ImageManager._generateCacheKey(path, hue) ⇒ string ​

生成缓存键名
Generate cache key

Kind: static method of ImageManager
Returns: string - 缓存键名 / Cache key

ParamTypeDescription
pathstring图像路径 / Image path
huenumber色调 / Hue

ImageManager.loadAnimation(filename, hue) ⇒ Bitmap ​

加载动画图像
Load animation image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadBattleback1(filename, hue) ⇒ Bitmap ​

加载战斗背景 1
Load battle background 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadBattleback2(filename, hue) ⇒ Bitmap ​

加载战斗背景 2
Load battle background 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadEnemy(filename, hue) ⇒ Bitmap ​

加载敌人战斗图(正视图)
Load enemy battle image (front view)

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadCharacter(filename, hue) ⇒ Bitmap ​

加载角色行走图
Load character walking sprite

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadFace(filename, hue) ⇒ Bitmap ​

加载脸图
Load face image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadParallax(filename, hue) ⇒ Bitmap ​

加载远景图
Load parallax image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadPicture(filename, hue) ⇒ Bitmap ​

加载图片
Load picture

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadSvActor(filename, hue) ⇒ Bitmap ​

加载我方战斗图(侧面图)
在战斗场景的 SideView 战斗系统下使用。

Load actor battle image (side view)
Used in SideView battle system in battle scenes.

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadSvEnemy(filename, hue) ⇒ Bitmap ​

加载敌人战斗图(侧面图)
在战斗场景的 SideView 战斗系统下使用。

Load enemy battle image (side view)
Used in SideView battle system in battle scenes.

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadSystem(filename, hue) ⇒ Bitmap ​

加载系统图片
Load system image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadTileset(filename, hue) ⇒ Bitmap ​

加载地图图块
Load tileset

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadTitle1(filename, hue) ⇒ Bitmap ​

加载标题图片 1
Load title image 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadTitle2(filename, hue) ⇒ Bitmap ​

加载标题图片 2
Load title image 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.loadBitmap(folder, filename, hue, smooth) ⇒ Bitmap ​

加载位图
Load bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
folderstring文件夹路径 / Folder path
filenamestring文件名 / Filename
huenumber色调 / Hue
smoothboolean是否平滑 / Whether to smooth

ImageManager.loadEmptyBitmap() ⇒ Bitmap ​

加载空白位图
Load empty bitmap

Kind: static method of ImageManager
Returns: Bitmap - 空白位图对象 / Empty bitmap object


ImageManager.loadNormalBitmap(path, hue) ⇒ Bitmap ​

加载标准位图
Load normal bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
pathstring图像路径 / Image path
huenumber色调 / Hue

ImageManager.clear() ​

清空缓存
Clear cache

Kind: static method of ImageManager


ImageManager.isReady() ⇒ boolean ​

是否准备好
Check if ready

Kind: static method of ImageManager
Returns: boolean - 是否准备好 / Whether ready


ImageManager.isObjectCharacter(filename) ⇒ boolean ​

是否物体的行走图
图片名字!开头(包括!$),取消角色比地图元件高 6 像素的效果以及经
过流体属性图块时的半透明效果。大多用于物件类的角色,如门和宝箱。

Check if object character
Image names starting with ! (including !$), cancel the effect of characters being 6 pixels higher than map elements
and the semi-transparent effect when passing through fluid attribute tiles. Mostly used for object-like characters such as doors and treasure chests.

Kind: static method of ImageManager
Returns: boolean - 是否物体行走图 / Whether object character

ParamTypeDescription
filenamestring文件名 / Filename

ImageManager.isBigCharacter(filename) ⇒ boolean ​

是否大张的行走图
图片名字开头(包括!),该文件就只能容纳一个角色元。

Check if big character
Image names starting with $ (including !$), the file can only contain one character element.

Kind: static method of ImageManager
Returns: boolean - 是否大张行走图 / Whether big character

ParamTypeDescription
filenamestring文件名 / Filename

ImageManager.isZeroParallax(filename) ⇒ boolean ​

是否零视差图
视差图也就是远景图,与地面位移存在视差,零视差相当于地面。
图片名字!开头,将被视作地面来显示。

Check if zero parallax
Parallax images are distant view images, with parallax displacement from the ground. Zero parallax is equivalent to the ground.
Image names starting with ! will be displayed as ground.

Kind: static method of ImageManager
Returns: boolean - 是否零视差图 / Whether zero parallax

ParamTypeDescription
filenamestring文件名 / Filename

ImageManager.reserveAnimation(filename, hue, reservationId) ⇒ Bitmap ​

储存动画图像
Reserve animation image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveBattleback1(filename, hue, reservationId) ⇒ Bitmap ​

储存战斗背景1
Reserve battle background 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveBattleback2(filename, hue, reservationId) ⇒ Bitmap ​

储存战斗背景2
Reserve battle background 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveEnemy(filename, hue, reservationId) ⇒ Bitmap ​

储存纵版战斗敌人战斗图
Reserve front view battle enemy image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveCharacter(filename, hue, reservationId) ⇒ Bitmap ​

储存角色行走图
Reserve character walking sprite

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveFace(filename, hue, reservationId) ⇒ Bitmap ​

储存脸图
Reserve face image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveParallax(filename, hue, reservationId) ⇒ Bitmap ​

储存远景图
Reserve parallax image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reservePicture(filename, hue, reservationId) ⇒ Bitmap ​

储存图片
Reserve picture

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveSvActor(filename, hue, reservationId) ⇒ Bitmap ​

储存横版战斗我方战斗图
Reserve side view actor battle image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveSvEnemy(filename, hue, reservationId) ⇒ Bitmap ​

储存横版战斗敌人战斗图
Reserve side view enemy battle image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveSystem(filename, hue, reservationId) ⇒ Bitmap ​

储存系统图片
Reserve system image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveTileset(filename, hue, reservationId) ⇒ Bitmap ​

储存地图图块
Reserve tileset

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveTitle1(filename, hue, reservationId) ⇒ Bitmap ​

储存标题图片 1
Reserve title image 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveTitle2(filename, hue, reservationId) ⇒ Bitmap ​

储存标题图片 2
Reserve title image 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.reserveBitmap(folder, filename, hue, smooth, reservationId) ⇒ Bitmap ​

储存位图
Reserve bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
folderstring文件夹路径 / Folder path
filenamestring文件名 / Filename
huenumber色调 / Hue
smoothboolean是否平滑 / Whether to smooth
reservationIdstring储存ID / Reservation ID

ImageManager.reserveNormalBitmap(path, hue, reservationId) ⇒ Bitmap ​

储存标准位图
Reserve normal bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
pathstring图像路径 / Image path
huenumber色调 / Hue
reservationIdstring储存ID / Reservation ID

ImageManager.releaseReservation(reservationId) ​

释放储存
Release reservation

Kind: static method of ImageManager

ParamTypeDescription
reservationIdstring储存ID / Reservation ID

ImageManager.setDefaultReservationId(reservationId) ​

设置默认储存 ID
Set default reservation ID

Kind: static method of ImageManager

ParamTypeDescription
reservationIdstring储存ID / Reservation ID

ImageManager.requestAnimation(filename, hue) ⇒ Bitmap ​

请求动画图像
Request animation image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestBattleback1(filename, hue) ⇒ Bitmap ​

请求战斗背景 1
Request battle background 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestBattleback2(filename, hue) ⇒ Bitmap ​

请求战斗背景 2
Request battle background 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestEnemy(filename, hue) ⇒ Bitmap ​

请求纵版战斗敌人战斗图
Request front view battle enemy image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestCharacter(filename, hue) ⇒ Bitmap ​

请求角色行走图
Request character walking sprite

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestFace(filename, hue) ⇒ Bitmap ​

请求脸图
Request face image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestParallax(filename, hue) ⇒ Bitmap ​

请求远景图
Request parallax image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestPicture(filename, hue) ⇒ Bitmap ​

请求图片
Request picture

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestSvActor(filename, hue) ⇒ Bitmap ​

请求横版战斗我方战斗图
Request side view actor battle image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestSvEnemy(filename, hue) ⇒ Bitmap ​

请求横版战斗敌人战斗图
Request side view enemy battle image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestSystem(filename, hue) ⇒ Bitmap ​

请求系统图片
Request system image

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestTileset(filename, hue) ⇒ Bitmap ​

请求地图图块
Request tileset

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestTitle1(filename, hue) ⇒ Bitmap ​

请求标题图片 1
Request title image 1

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestTitle2(filename, hue) ⇒ Bitmap ​

请求标题图片 2
Request title image 2

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
filenamestring文件名 / Filename
huenumber色调 / Hue

ImageManager.requestBitmap(folder, filename, hue, smooth) ⇒ Bitmap ​

请求位图
Request bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
folderstring文件夹路径 / Folder path
filenamestring文件名 / Filename
huenumber色调 / Hue
smoothboolean是否平滑 / Whether to smooth

ImageManager.requestNormalBitmap(path, hue) ⇒ Bitmap ​

请求标准位图
Request normal bitmap

Kind: static method of ImageManager
Returns: Bitmap - 位图对象 / Bitmap object

ParamTypeDescription
pathstring图像路径 / Image path
huenumber色调 / Hue

ImageManager.update() ​

更新请求队列
Update request queue

Kind: static method of ImageManager


ImageManager.clearRequest() ​

清空请求队列
Clear request queue

Kind: static method of ImageManager


贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新