Skip to content

图像 ​

Phaser Editor v5 · 英文原文

Image是一种内置的Phaser天体类型:Phaser.GameObjects.Image.

您可以通过从块视图中丢弃图像内置类型或纹理来创建 Image 对象 。

Add image from Blocks view.

两者的主要区别是 Image 和一个闪光的,是 Image 无法播放对象 sprite animations.

Image在代码中使用image factory创建。scene compiler就是这样生成一个Image的代码的:

javascript
const branch_1 = this.add.image(192, 512, "atlas-props", "branch-01");

Image具有与其他对象类型相同的属性: .


社区翻译