I am trying convert the Phaser coding tip 2 to Phaser 3. There are 2 things I have trouble with:
The first is draw png file to bitmap, in Phaser 2:
this.land = this.add.bitmapData(992, 480);
this.land.draw(‘land’);
this.land.update();
this.land.addToWorld();
The 2nd is creat a hole when the bullet touch the land:
this.land.blendDestinationOut();
this.land.circle(x, y, 16, ‘rgba(0, 0, 0, 255’);
this.land.blendReset();
this.land.update();
this.removeBullet();
Does anyone have any ideas? Thank you
Thank you very much, samme. But I have one trouble with:
var x = Math.floor(this.bullet.x)
does it in phaser 3 is: var x = Phaser.Geom.Point.floor(this.bullet.x)