本文整理匯總了Java中com.b3dgs.lionengine.game.FramesConfig類的典型用法代碼示例。如果您正苦於以下問題:Java FramesConfig類的具體用法?Java FramesConfig怎麽用?Java FramesConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FramesConfig類屬於com.b3dgs.lionengine.game包,在下文中一共展示了FramesConfig類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Entity
import com.b3dgs.lionengine.game.FramesConfig; //導入依賴的package包/類
/**
* Create an entity.
*
* @param services The services reference.
* @param setup The setup used.
* @throws LionEngineException If error.
*/
public Entity(Services services, SetupSurfaceRastered setup)
{
super();
final FramesConfig frames = FramesConfig.imports(setup);
surface = Drawable.loadSpriteAnimated(setup.getSurface(), frames.getHorizontal(), frames.getVertical());
tileCollidable = addFeatureAndGet(new TileCollidableModel(services, setup));
body.setMass(2.0);
body.setGravityMax(7.0);
body.setDesiredFps(60);
body.setVectors(movement, jump);
viewer = services.get(Viewer.class);
StateAnimationBased.Util.loadStates(EntityState.values(), stateFactory, this, setup);
stateHandler.addInput(getInput());
stateHandler.changeState(EntityState.IDLE);
}
示例2: EffectModel
import com.b3dgs.lionengine.game.FramesConfig; //導入依賴的package包/類
/**
* Create an effect.
*
* @param setup The setup reference.
*/
EffectModel(Setup setup)
{
super();
final FramesConfig config = FramesConfig.imports(setup);
surface = Drawable.loadSpriteAnimated(setup.getSurface(), config.getHorizontal(), config.getVertical());
surface.setOrigin(Origin.MIDDLE);
}
示例3: ProjectileModel
import com.b3dgs.lionengine.game.FramesConfig; //導入依賴的package包/類
/**
* Create a projectile model.
*
* @param setup The setup reference.
*/
ProjectileModel(Setup setup)
{
super();
final FramesConfig frames = FramesConfig.imports(setup);
surface = Drawable.loadSpriteAnimated(setup.getSurface(), frames.getHorizontal(), frames.getVertical());
surface.setFrame(setup.getInteger(ATT_FRAME, SurfaceConfig.NODE_SURFACE));
surface.setOrigin(Origin.MIDDLE);
effectRate = setup.getIntegerDefault(0, ATT_RATE, NODE_EFFECT);
if (setup.getRoot().hasChild(NODE_EFFECT))
{
effectMedia = Medias.create(setup.getText(NODE_EFFECT));
}
else
{
effectMedia = null;
}
final Xml root = setup.getRoot();
if (root.hasChild(ForceConfig.NODE_FORCE))
{
acceleration = ForceConfig.imports(root);
}
else
{
acceleration = new Force();
}
}