Hi all, I am trying to convert this post to phaser 3: Phaser Coding Tips 2: Creating a game like Tanks / Worms, Part 2 - Learn - Phaser
but the update() function not working. In file a.ts I create a canvas texture:
this.textures1 = this.textures.createCanvas('canvastextures1', 450, 170)
this.land1 = this.textures.get(MAPOPTIONS.BASE1_NAME).getSourceImage()
this.textures1.draw(0, 0, this.land1)
this.textures1.context.globalCompositeOperation = 'destination-out'
and in file b.ts, in overlap() function:
this.activeTextures = this.textures.get('canvastextures1')
this.activeTextures.context.beginPath()
this.activeTextures.context.arc(Math.floor(overlap2.x-tile.getTopLeft().x), Math.floor(overlap2.y-tile.getTopLeft().y), 50, 0, Math.PI * 2, false)
this.activeTextures.context.fill()
this.activeTextures.update()
Does anyone have any ideas? Thank you.