use of com.almasb.fxgl.entity.control.EffectControl in project FXGL by AlmasB.
the class MarioFactory method newPlayer.
@Spawns("player")
public Entity newPlayer(SpawnData data) {
PhysicsComponent physics = new PhysicsComponent();
physics.setBodyType(BodyType.DYNAMIC);
return Entities.builder().type(MarioType.PLAYER).from(data).bbox(new HitBox(BoundingShape.box(32, 42))).with(physics).with(new CollidableComponent(true)).with(new PlayerControl(), new EffectControl()).build();
}
Aggregations