Tabnine Logo
KeyInput.getInputTimeNanos
Code IndexAdd Tabnine to your IDE (free)

How to use
getInputTimeNanos
method
in
com.jme3.input.KeyInput

Best Java code snippets using com.jme3.input.KeyInput.getInputTimeNanos (Showing top 6 results out of 315)

origin: jMonkeyEngine/jmonkeyengine

/**
 * Initializes the InputManager.
 *
 * <p>This should only be called internally in {@link Application}.
 *
 * @param mouse
 * @param keys
 * @param joystick
 * @param touch
 * @throws IllegalArgumentException If either mouseInput or keyInput are null.
 */
public InputManager(MouseInput mouse, KeyInput keys, JoyInput joystick, TouchInput touch) {
  if (keys == null || mouse == null) {
    throw new IllegalArgumentException("Mouse or keyboard cannot be null");
  }
  this.keys = keys;
  this.mouse = mouse;
  this.joystick = joystick;
  this.touch = touch;
  keys.setInputListener(this);
  mouse.setInputListener(this);
  if (joystick != null) {
    joystick.setInputListener(this);
    joysticks = joystick.loadJoysticks(this);
  }
  if (touch != null) {
    touch.setInputListener(this);
  }
  firstTime = keys.getInputTimeNanos();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Updates the <code>InputManager</code>.
 * This will query current input devices and send
 * appropriate events to registered listeners.
 *
 * @param tpf Time per frame value.
 */
public void update(float tpf) {
  frameTPF = tpf;
  // Activate safemode if the TPF value is so small
  // that rounding errors are inevitable
  safeMode = tpf < 0.015f;
  long currentTime = keys.getInputTimeNanos();
  frameDelta = currentTime - lastUpdateTime;
  eventsPermitted = true;
  keys.update();
  mouse.update();
  if (joystick != null) {
    joystick.update();
  }
  if (touch != null) {
    touch.update();
  }
  eventsPermitted = false;
  processQueue();
  invokeUpdateActions();
  lastLastUpdateTime = lastUpdateTime;
  lastUpdateTime = currentTime;
}
origin: info.projectkyoto/mms-engine

/**
 * Initializes the InputManager.
 * 
 * <p>This should only be called internally in {@link Application}.
 *
 * @param mouseInput
 * @param keyInput
 * @param joyInput
 * @throws IllegalArgumentException If either mouseInput or keyInput are null.
 */
public InputManager(MouseInput mouse, KeyInput keys, JoyInput joystick, TouchInput touch) {
  if (keys == null || mouse == null) {
    throw new NullPointerException("Mouse or keyboard cannot be null");
  }
  this.keys = keys;
  this.mouse = mouse;
  this.joystick = joystick;
  this.touch = touch;
  keys.setInputListener(this);
  mouse.setInputListener(this);
  if (joystick != null) {
    joystick.setInputListener(this);
    joysticks = joystick.loadJoysticks(this);
  }
  if (touch != null) {
    touch.setInputListener(this);
  }
  firstTime = keys.getInputTimeNanos();
}
origin: org.jmonkeyengine/jme3-core

/**
 * Initializes the InputManager.
 *
 * <p>This should only be called internally in {@link Application}.
 *
 * @param mouse
 * @param keys
 * @param joystick
 * @param touch
 * @throws IllegalArgumentException If either mouseInput or keyInput are null.
 */
public InputManager(MouseInput mouse, KeyInput keys, JoyInput joystick, TouchInput touch) {
  if (keys == null || mouse == null) {
    throw new IllegalArgumentException("Mouse or keyboard cannot be null");
  }
  this.keys = keys;
  this.mouse = mouse;
  this.joystick = joystick;
  this.touch = touch;
  keys.setInputListener(this);
  mouse.setInputListener(this);
  if (joystick != null) {
    joystick.setInputListener(this);
    joysticks = joystick.loadJoysticks(this);
  }
  if (touch != null) {
    touch.setInputListener(this);
  }
  firstTime = keys.getInputTimeNanos();
}
origin: org.jmonkeyengine/jme3-core

/**
 * Updates the <code>InputManager</code>.
 * This will query current input devices and send
 * appropriate events to registered listeners.
 *
 * @param tpf Time per frame value.
 */
public void update(float tpf) {
  frameTPF = tpf;
  // Activate safemode if the TPF value is so small
  // that rounding errors are inevitable
  safeMode = tpf < 0.015f;
  long currentTime = keys.getInputTimeNanos();
  frameDelta = currentTime - lastUpdateTime;
  eventsPermitted = true;
  keys.update();
  mouse.update();
  if (joystick != null) {
    joystick.update();
  }
  if (touch != null) {
    touch.update();
  }
  eventsPermitted = false;
  processQueue();
  invokeUpdateActions();
  lastLastUpdateTime = lastUpdateTime;
  lastUpdateTime = currentTime;
}
origin: info.projectkyoto/mms-engine

long currentTime = keys.getInputTimeNanos();
frameDelta = currentTime - lastUpdateTime;
com.jme3.inputKeyInputgetInputTimeNanos

Popular methods of KeyInput

  • initialize
  • destroy
  • setInputListener
  • update

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Table (org.hibernate.mapping)
    A relational table
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now