Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function update() {
- // Convert the mouse position to world position within the camera
- const worldPoint = this.input.activePointer.positionToCamera(this.cameras.main);
- // Draw tiles (only within the groundLayer)
- if (this.input.manager.activePointer.isDown) {
- groundLayer.putTileAtWorldXY(353, worldPoint.x, worldPoint.y);
- }
- }
Add Comment
Please, Sign In to add comment