Package com.artemis

Examples of com.artemis.Entity


  @Test @SuppressWarnings("static-method")
  public void pooled_class_with_many_constructors() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e1 = world.createEntity();
    PolyConstructor pooled1 = e1.createComponent(PolyConstructor.class);
    assertEquals(PooledComponent.class, pooled1.getClass().getSuperclass());

    PolyConstructor pooled2 = new PolyConstructor(420);
    assertEquals(PooledComponent.class, pooled2.getClass().getSuperclass());
  }
View Full Code Here


 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_id_position_x_y_) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
View Full Code Here

 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_id_position_x_y_) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
View Full Code Here

 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_id_position_x_y_) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
View Full Code Here

 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_id_position_x_y_) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
View Full Code Here

 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_id_position_x_y_) {
      Position c = positionMapper.get(e);
      c.x = _position_x;
      c.y = _position_y;
View Full Code Here

 
  @Override
  public Entity create() {
    _sealed = true;
   
    Entity e = world.createEntity(archetype);

    if (_tag) {
      tagManager.register(_tag_tag, e);
      _tag = false;
    }
View Full Code Here

    world = new World();
    world.initialize();
  }
 
  private void create() {
    Entity e = world.createEntity();
    e.edit().create(SimpleComponent.class).value = e.getId();
  }
View Full Code Here

    world.process();
   
    ComponentMapper<SimpleComponent> mapper = world.getMapper(SimpleComponent.class);
    assertNotNull(mapper);
    for (int i = 0; total > i; i++) {
      Entity e = world.getEntity(i);
      assertEquals(i, mapper.get(e).value);
    }
   
  }
View Full Code Here

    world.initialize();
  }
 
  @Test
  public void added_entities_should_only_occur_once() {
    Entity entity = world.createEntity();
    gm.add(entity, GROUPIE);
    gm.add(entity, GROUPIE);

    assertEquals(1, gm.getEntities(GROUPIE).size());
  }
View Full Code Here

TOP

Related Classes of com.artemis.Entity

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.