Testing out JmonkeyEngine to make a game in Scala with Akka Actors within a pure FP layer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
483 B

4 years ago
  1. package com.jme3
  2. import com.jme3.input.controls.{InputListener, Trigger}
  3. /**
  4. * Created by Brandon Barker on 6/21/17.
  5. */
  6. package object input {
  7. implicit class InputManagerWrap(val uval: InputManager) extends AnyVal {
  8. def addMapping(action: Action, triggers: Trigger*): Unit =
  9. uval.addMapping(action.name, triggers: _*)
  10. def addListener(listener: InputListener, actions: Action*): Unit =
  11. uval.addListener(listener, actions.map(act => act.name): _*)
  12. }
  13. }