use of com.b3dgs.lionengine.game.feature.IdentifiableModel in project lionengine by b3dgs.
the class UtilAssignable method createAssignable.
/**
* Create the assignable.
*
* @param services The services.
* @return The prepared assignable.
*/
public static AssignableModel createAssignable(Services services) {
final Featurable featurable = new FeaturableModel();
featurable.addFeature(new IdentifiableModel());
final AssignableModel assignable = new AssignableModel(services);
assignable.prepare(featurable);
return assignable;
}
use of com.b3dgs.lionengine.game.feature.IdentifiableModel in project lionengine by b3dgs.
the class AttackerModelTest method prepare.
/**
* Prepare test.
*/
@Before
public void prepare() {
UtilAttackable.prepare(object);
object.addFeature(new IdentifiableModel());
attacker = UtilAttackable.createAttacker(object, services);
}
use of com.b3dgs.lionengine.game.feature.IdentifiableModel in project lionengine by b3dgs.
the class UtilLaunchable method createLaunchable.
/**
* Create launchable.
*
* @param services The services.
* @param featurable The featurable.
* @return The launchable.
*/
public static Launchable createLaunchable(Services services, Featurable featurable) {
featurable.addFeature(new IdentifiableModel());
featurable.addFeature(new TransformableModel());
final Launchable launchable = new LaunchableModel();
launchable.prepare(featurable);
launchable.setLocation(0.0, 0.0);
launchable.setVector(new Force(0.0, 1.0));
return launchable;
}
use of com.b3dgs.lionengine.game.feature.IdentifiableModel in project lionengine by b3dgs.
the class UtilExtractable method createExtractable.
/**
* Create extractable.
*
* @return The extractable.
*/
public static Extractable createExtractable() {
final Services services = new Services();
services.add(new MapTileGame());
final Featurable featurable = new FeaturableModel();
featurable.addFeature(new IdentifiableModel());
featurable.addFeature(new TransformableModel());
final Extractable extractable = new ExtractableModel(services);
extractable.setResourcesQuantity(10);
extractable.setResourcesType(ResourceType.WOOD);
extractable.prepare(featurable);
return extractable;
}
Aggregations