Game_Picture
Game_Picture
Kind: global class
- Game_Picture
- new Game_Picture()
- .initialize()
- .name() ⇒
String - .origin() ⇒
Number - .x() ⇒
Number - .y() ⇒
Number - .scaleX() ⇒
Number - .scaleY() ⇒
Number - .opacity() ⇒
Number - .blendMode() ⇒
Number - .tone() ⇒
Array - .angle() ⇒
Number - .initBasic()
- .initTarget()
- .initTone()
- .initRotation()
- .show(name, origin, x, y, scaleX, scaleY, opacity, blendMode)
- .move(origin, x, y, scaleX, scaleY, opacity, blendMode, duration)
- .rotate(speed)
- .tint(tone, duration)
- .erase()
- .update()
- .updateMove()
- .updateTone()
- .updateRotation()
new Game_Picture()
图片对象类
Game picture class
Game_Picture.initialize()
初始化图片对象
Initialize picture object
Kind: static method of Game_Picture
Game_Picture.name() ⇒ String
获取图片名字
Get picture name
Kind: static method of Game_Picture
Returns: String - 图片名字 - Picture name
Game_Picture.origin() ⇒ Number
获取图片原点
Get picture origin
Kind: static method of Game_Picture
Returns: Number - 原点 (0:左上角, 1:中心) - Origin (0:top-left, 1:center)
Game_Picture.x() ⇒ Number
获取 X 坐标
Get X coordinate
Kind: static method of Game_Picture
Returns: Number - X 坐标 - X coordinate
Game_Picture.y() ⇒ Number
获取 Y 坐标
Get Y coordinate
Kind: static method of Game_Picture
Returns: Number - Y 坐标 - Y coordinate
Game_Picture.scaleX() ⇒ Number
获取 X 轴方向的缩放比例
Get X axis scale ratio
Kind: static method of Game_Picture
Returns: Number - X 轴缩放比例 - X axis scale ratio
Game_Picture.scaleY() ⇒ Number
获取 Y 轴方向的缩放比例
Get Y axis scale ratio
Kind: static method of Game_Picture
Returns: Number - Y 轴缩放比例 - Y axis scale ratio
Game_Picture.opacity() ⇒ Number
获取不透明度
Get opacity
Kind: static method of Game_Picture
Returns: Number - 不透明度 (0-255) - Opacity (0-255)
Game_Picture.blendMode() ⇒ Number
获取混合模式
Get blend mode
Kind: static method of Game_Picture
Returns: Number - 混合模式 - Blend mode
Game_Picture.tone() ⇒ Array
获取色调
Get tone
Kind: static method of Game_Picture
Returns: Array - 色调数组 [红, 绿, 蓝, 灰] - Tone array [red, green, blue, gray]
Game_Picture.angle() ⇒ Number
获取角度
Get angle
Kind: static method of Game_Picture
Returns: Number - 角度 - Angle
Game_Picture.initBasic()
初始化基本参数
Initialize basic parameters
Kind: static method of Game_Picture
Game_Picture.initTarget()
初始化目标参数
Initialize target parameters
Kind: static method of Game_Picture
Game_Picture.initTone()
初始化色调
Initialize tone
Kind: static method of Game_Picture
Game_Picture.initRotation()
初始化旋转
Initialize rotation
Kind: static method of Game_Picture
Game_Picture.show(name, origin, x, y, scaleX, scaleY, opacity, blendMode)
显示图片
Show picture
Kind: static method of Game_Picture
| Param | Type | Description |
|---|---|---|
| name | String | 图片文件名 - Picture filename |
| origin | Number | 原点 (0:左上角, 1:中心) - Origin (0:top-left, 1:center) |
| x | Number | X 坐标 - X coordinate |
| y | Number | Y 坐标 - Y coordinate |
| scaleX | Number | X 轴缩放比例 - X axis scale ratio |
| scaleY | Number | Y 轴缩放比例 - Y axis scale ratio |
| opacity | Number | 不透明度 - Opacity |
| blendMode | Number | 混合模式 - Blend mode |
Game_Picture.move(origin, x, y, scaleX, scaleY, opacity, blendMode, duration)
移动图片
Move picture
Kind: static method of Game_Picture
| Param | Type | Description |
|---|---|---|
| origin | Number | 原点 - Origin |
| x | Number | 目标 X 坐标 - Target X coordinate |
| y | Number | 目标 Y 坐标 - Target Y coordinate |
| scaleX | Number | 目标 X 轴缩放比例 - Target X axis scale ratio |
| scaleY | Number | 目标 Y 轴缩放比例 - Target Y axis scale ratio |
| opacity | Number | 目标不透明度 - Target opacity |
| blendMode | Number | 混合模式 - Blend mode |
| duration | Number | 持续时间(帧数) - Duration in frames |
Game_Picture.rotate(speed)
旋转图片
Rotate picture
Kind: static method of Game_Picture
| Param | Type | Description |
|---|---|---|
| speed | Number | 旋转速度 - Rotation speed |
Game_Picture.tint(tone, duration)
着色图片
Tint picture
Kind: static method of Game_Picture
| Param | Type | Description |
|---|---|---|
| tone | Array | 目标色调 [红, 绿, 蓝, 灰] - Target tone [red, green, blue, gray] |
| duration | Number | 持续时间(帧数) - Duration in frames |
Game_Picture.erase()
消除图片
Erase picture
Kind: static method of Game_Picture
Game_Picture.update()
更新图片
Update picture
Kind: static method of Game_Picture
Game_Picture.updateMove()
更新移动
Update movement
Kind: static method of Game_Picture
Game_Picture.updateTone()
更新色调
Update tone
Kind: static method of Game_Picture
Game_Picture.updateRotation()
更新旋转
Update rotation
Kind: static method of Game_Picture