Examples of VisualComponent


Examples of com.badlogic.ashley.tests.components.VisualComponent

  }

  @Override
  public void update(float deltaTime) {
    PositionComponent position;
    VisualComponent visual;
   
    camera.update();
   
    batch.begin();
    batch.setProjectionMatrix(camera.combined);
View Full Code Here

Examples of com.badlogic.ashley.tests.components.VisualComponent

      engine.addSystem(new RenderSystem(camera));
      engine.addSystem(new MovementSystem());
     
      Entity crate = engine.createEntity();
      crate.add(new PositionComponent(50, 50));
      crate.add(new VisualComponent(new TextureRegion(crateTexture)));

      engine.addEntity(crate);
     
      TextureRegion coinRegion = new TextureRegion(coinTexture);
     
      for(int i=0; i<100; i++){
        Entity coin = engine.createEntity();
        coin.add(new PositionComponent(MathUtils.random(640), MathUtils.random(480)));
        coin.add(new MovementComponent(10.0f, 10.0f));
        coin.add(new VisualComponent(coinRegion));
        engine.addEntity(coin);
      }
    }
View Full Code Here

Examples of com.dragome.model.interfaces.VisualComponent

    return null;
  }

  public void replaceChild(VisualComponent child)
  {
    VisualComponent childByName= getChildByName(child.getName());
    children.remove(childByName);
    childByName.setParent(null);
    children.add(child);
    child.setParent(this);
    if (hasListener(PanelListener.class))
      getListener(PanelListener.class).childReplaced(childByName, child);
  }
View Full Code Here

Examples of com.dragome.model.interfaces.VisualComponent

    return null;
  }

  public void replaceChild(VisualComponent child)
  {
    VisualComponent childByName= getChildByName(child.getName());
    children.remove(childByName);
    childByName.setParent(null);
    children.add(child);
    child.setParent(this);
    if (hasListener(PanelListener.class))
      getListener(PanelListener.class).childReplaced(childByName, child);
  }
View Full Code Here

Examples of com.dragome.model.interfaces.VisualComponent

  {
    runOnlySynchronized(new Runnable()
    {
      public void run()
      {
        VisualComponent visualComponent= getComponentById(id);
        if (visualComponent != null)
        {
          if (eventType.equals("click"))
            visualComponent.getListener(ClickListener.class).clickPerformed(visualComponent);
          else if (eventType.equals("dblclick"))
            visualComponent.getListener(DoubleClickListener.class).doubleClickPerformed(visualComponent);
          else if (eventType.equals("mouseover"))
            visualComponent.getListener(MouseOverListener.class).mouseOverPerformed(visualComponent);
          else if (eventType.equals("mouseout"))
            visualComponent.getListener(MouseOutListener.class).mouseOutPerformed(visualComponent);
          else if (eventType.equals("keyup"))
            visualComponent.getListener(KeyUpListener.class).keyupPerformed(visualComponent, (int) arguments);
          else if (eventType.equals("keydown"))
            visualComponent.getListener(KeyDownListener.class).keydownPerformed(visualComponent, (int) arguments);
          else if (eventType.equals("keypress"))
            visualComponent.getListener(KeyPressListener.class).keypressPerformed(visualComponent, (int) arguments);
          else if (eventType.equals("blur"))
            visualComponent.getListener(BlurListener.class).blurPerformed(visualComponent);
          else if (eventType.equals("input"))
            visualComponent.getListener(InputListener.class).inputPerformed(visualComponent);
        }
      }
    });
  }
View Full Code Here

Examples of com.l2client.component.VisualComponent

        Node nn = new Node("intermed");
        nn.attachChild(m);
        ent.attachChild(nn);
       
        rootNode.attachChild(ent);
        VisualComponent vis = new VisualComponent();
        EnvironmentComponent env = new EnvironmentComponent();
       
        em.addComponent(ent.getId(), env);
        em.addComponent(ent.getId(), vis);
       
View Full Code Here

Examples of com.l2client.component.VisualComponent

   
    EntityManager em = Singleton.get().getEntityManager();
    final Entity ent = em.createEntity(e.getObjectId());
    PositioningComponent pos = new PositioningComponent();
    L2JComponent l2j = new L2JComponent();
    VisualComponent vis = new VisualComponent();
    EnvironmentComponent env = new EnvironmentComponent();
    TargetComponent tgt = new TargetComponent();
    LoggingComponent log = new LoggingComponent();
   
    em.addComponent(ent.getId(), env);
View Full Code Here

Examples of com.l2client.component.VisualComponent

  private void createNpc(NpcData e) {
   
    EntityManager em = Singleton.get().getEntityManager();
    PositioningComponent pos = new PositioningComponent();
    L2JComponent l2j = new L2JComponent();
    VisualComponent vis = new VisualComponent();
    EnvironmentComponent env = new EnvironmentComponent();
    //FIXME parallel create problems, synchronize creation and essential components or at least create/check of components
System.out.println("createNpc pre createEntity "+e.getObjectId());
    Entity ent = em.createEntity(e.getObjectId());
System.out.println("createNpc post createEntity "+e.getObjectId());
View Full Code Here

Examples of com.l2client.component.VisualComponent

      if(damage > 0)
        Singleton.get().getAnimSystem().callAction(CallActions.Wounded, defend);
      else
        Singleton.get().getAnimSystem().callAction(CallActions.Defend, defend);
      if(damage != 0){
        VisualComponent comp = (VisualComponent) Singleton.get().getEntityManager().getComponent(defend, VisualComponent.class);
        ColorRGBA color;
        switch(type){
        case 1:color = ColorRGBA.Orange;break;
        case 2:color = ColorRGBA.Yellow;break;
        default:color = ColorRGBA.Red;
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.