我正在尝试使用Phaser 2进行游戏,并且我的这张Spritesheet包含许多图像,需要随机获取并使用。 这就是我只使用一张图片而不是一张Spritesheet的方式。
this.plastico2 = this.add.sprite(this.world.centerX, 20, 'plastico2');
this.plastico2.anchor.setTo(0.5);
this.plastico2.scale.setTo(1.5);
this.physics.arcade.enable(this.plastico2);
this.plastico2.body.collideWorldBounds = true;