Пример #1
0
 public void onMouseButtonEvent(MouseButtonEvent evt) {
   if (evt.getButtonIndex() == 0 && evt.isPressed()) {
     if (inventoryType == InventoryType.PointClick) {
       if (cursor.getUserData("worldObject") != null) {
         InteractiveNode node = cursor.getUserData("worldObject");
         main.getRootNode().attachChild(node);
         node.setIsInScene(true);
         cursor.setUserData("worldObject", null);
         cursor.setTextureAtlasImage(objIcons, iconDefault);
       }
     }
   }
 }
Пример #2
0
 private void onMouseButtonEventQueued(MouseButtonEvent evt) {
   int hash = MouseButtonTrigger.mouseButtonHash(evt.getButtonIndex());
   invokeActions(hash, evt.isPressed());
   invokeTimedActions(hash, evt.getTime(), evt.isPressed());
 }