Guest User

Untitled

a guest
Jul 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function update() {
  2. // Convert the mouse position to world position within the camera
  3. const worldPoint = this.input.activePointer.positionToCamera(this.cameras.main);
  4.  
  5. // Draw tiles (only within the groundLayer)
  6. if (this.input.manager.activePointer.isDown) {
  7. groundLayer.putTileAtWorldXY(353, worldPoint.x, worldPoint.y);
  8. }
  9. }
Add Comment
Please, Sign In to add comment