Package org.jdesktop.mtgame

Examples of org.jdesktop.mtgame.Entity.removeComponent()


  Entity entity = event.getEntity();
  SpinProcessor spinner = (SpinProcessor) entity.getComponent(SpinProcessor.class);
  if (spinner != null) {
      // Stop the spinning
      spinner.stop();
      entity.removeComponent(SpinProcessor.class);
  } else {
      // Start the spinning
      try {
    entity.addComponent(SpinProcessor.class, new SpinProcessor(entity));
      } catch (InstantiationException ex) {
View Full Code Here


            Logger.getAnonymousLogger().warning("VIEW NOT ATTACHED TO A CELL (BUT CONTINUE ANYWAY)");
            return;
        }

        Entity entity = ((CellRendererJME) attachCell.getCellRenderer(RendererType.RENDERER_JME)).getEntity();
        entity.removeComponent(ViewControls.class);

        CellRendererJME renderer = (CellRendererJME) attachCell.getCellRenderer(Cell.RendererType.RENDERER_JME);
        if (renderer != null) {
//            if (renderer instanceof ViewControls.AvatarInputSelector) {
//                ((ViewControls.AvatarInputSelector)renderer).selectForInput(false);
View Full Code Here

                    avatarControls.removeFromChain(moveProc);
                }
            }
        }

        entity.removeComponent(ViewControls.class);
        avatarControls.setEnabled(false);
        avatarControls = null;
        attachCell.removeTransformChangeListener(listener);
        attachCell = null;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.