Package com.artemis.reference

Examples of com.artemis.reference.Ship.create()


   
    Ship shipFactory = w.createFactory(Ship.class);
    assertNotNull(shipFactory);
    assertEquals(ShipImpl.class, shipFactory.getClass());
   
    Entity e = shipFactory.create();
    Entity e2 = shipFactory.create();
   
    // 1 is an entity with zero components.
    assertEquals(2, e.getCompositionId());
    assertEquals(2, e2.getCompositionId());
View Full Code Here


    Ship shipFactory = w.createFactory(Ship.class);
    assertNotNull(shipFactory);
    assertEquals(ShipImpl.class, shipFactory.getClass());
   
    Entity e = shipFactory.create();
    Entity e2 = shipFactory.create();
   
    // 1 is an entity with zero components.
    assertEquals(2, e.getCompositionId());
    assertEquals(2, e2.getCompositionId());
   
View Full Code Here

    assertEquals(ShipImpl.class, shipFactory.getClass());
   
    shipFactory.hitPoints(100);
   
    Entity e1 = shipFactory.size(10, 20).create();
    Entity e2 = shipFactory.create();
   
    assertEquals(10, e1.getComponent(Size.class).width, 0.001f);
    assertEquals(20, e1.getComponent(Size.class).height, 0.001f);
    assertEquals(100, e1.getComponent(HitPoints.class).hitpoints);
    assertEquals(0, e2.getComponent(Size.class).width, 0.001f);
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.