Skip to content

Instantly share code, notes, and snippets.

@andrjew andrjew/Main.scala

Created Dec 10, 2015
What would you like to do?
JQueryEventObject example
jQuery("div").mousemove{ event: JQueryEventObject =>
val mouseY = event.asInstanceOf[org.scalajs.dom.MouseEvent].clientY
val updatedY = game.screenHeight / 2 - mouseY
game.movePlayerShip(newY = Some(updatedY))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.