forked from nova/jmonkey-test
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
18 lines
483 B
package com.jme3
|
|
|
|
import com.jme3.input.controls.{InputListener, Trigger}
|
|
|
|
/**
|
|
* Created by Brandon Barker on 6/21/17.
|
|
*/
|
|
package object input {
|
|
|
|
implicit class InputManagerWrap(val uval: InputManager) extends AnyVal {
|
|
def addMapping(action: Action, triggers: Trigger*): Unit =
|
|
uval.addMapping(action.name, triggers: _*)
|
|
def addListener(listener: InputListener, actions: Action*): Unit =
|
|
uval.addListener(listener, actions.map(act => act.name): _*)
|
|
|
|
}
|
|
|
|
}
|