Guest User

Untitled

a guest
Feb 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private fun d(e : MouseEvent) {
  2.  
  3. val m = w.sceneToLocal( e.sceneX, e.sceneY )
  4. val tN = e.target as Node
  5. val tT = tN.findParentOfType(Tile::class)
  6.  
  7. if (::i.isInitialized && dnd) {
  8. if (tT is Tile && w.contains(mousePt) &&
  9. i.t.toIntOrNull() == null) {
  10. p(m.x, m.y)
  11. root.children[1].getChildList()!!.remove(iT)
  12.  
  13. t.w = 100.0
  14. t.h = 100.0
  15. dnd = false
  16. }
  17. }
  18. e.consume()
  19. }
Add Comment
Please, Sign In to add comment