Package com.badlogic.ashley.tests.components

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


      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

TOP

Related Classes of com.badlogic.ashley.tests.components.VisualComponent

Copyright © 2018 www.massapicom. 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.