Skip to content

Instantly share code, notes, and snippets.

@ahinchman1
Last active February 5, 2018 23:45
Show Gist options
  • Save ahinchman1/bb84ecdf1ae227d363a229d031d082c0 to your computer and use it in GitHub Desktop.
Save ahinchman1/bb84ecdf1ae227d363a229d031d082c0 to your computer and use it in GitHub Desktop.
Naming conventions, descriptive vs oversimplified
private fun d(e : MouseEvent) {
val m = w.sceneToLocal( e.sceneX, e.sceneY )
val tN = e.target as Node
val tT = tN.findParentOfType(Tile::class)
if (::i.isInitialized && dnd) {
if (tT is Tile && w.contains(mousePt) &&
i.t.toIntOrNull() == null) {
p(m.x, m.y)
root.children[1].getChildList()!!.remove(iT)
t.w = 100.0
t.h = 100.0
dnd = false
}
}
e.consume()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment