本文整理匯總了Java中com.badlogic.gdx.utils.Scaling.fillY方法的典型用法代碼示例。如果您正苦於以下問題:Java Scaling.fillY方法的具體用法?Java Scaling.fillY怎麽用?Java Scaling.fillY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.utils.Scaling
的用法示例。
在下文中一共展示了Scaling.fillY方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: SplashMenu
import com.badlogic.gdx.utils.Scaling; //導入方法依賴的package包/類
public SplashMenu() {
logo = new Image(new TextureRegionDrawable(Assets.getTextureRegion("core:logo.png")), Scaling.fillY, Align.center);
text = new Label("Loading " + Branding.DEBUG, new Label.LabelStyle(Fonts.smallHUD, Color.WHITE));
stage.addActor(logo);
stage.addActor(text);
}
示例2: create
import com.badlogic.gdx.utils.Scaling; //導入方法依賴的package包/類
@Override
public void create() {
//Init statics
OBJECT_ID = 0;
LoaderUtils loaderUtils = new LoaderUtils();
loaderUtils.init();
//Init cameras and controllers
ScreenViewport viewportGUI = new ScreenViewport(new OrthographicCamera());
CameraController oCameraGUI = new CameraController(viewportGUI);
oCameraGUI.getViewport().apply(true);
ScalingViewport viewportPlay = new ScalingViewport(Scaling.fillY, TARGET_WIDTH, TARGET_HEIGHT);
CameraController oCameraPlay = new CameraController(viewportPlay);
oCameraPlay.setBoundaries(worldBoundaries);
SpriteBatch batch = new SpriteBatch();
Stage playStage = new Stage(viewportPlay, batch);
Stage guiStage = new Stage(viewportGUI, batch);
InputController oInputCtrl = new InputController(playStage, guiStage);
PhysicsController physicsCtrl = new PhysicsController(oCameraPlay, TIME_STEP, 1, 1);
EngineController oEngineCtrl = new EngineController(playStage, guiStage, physicsCtrl, oInputCtrl, oCameraPlay, loaderUtils);
GUIController oGuiController = new GUIController(oCameraGUI, oCameraPlay, oInputCtrl, guiStage, loaderUtils);
MapController oMapController = new MapController(oEngineCtrl, oCameraPlay);
oMapController.loadMap("data/gameMap.tmx", batch, true);
//Set camera listener, for camera control
Scene2dListenersUtils.setupPlayStageCameraListener(playStage, oCameraPlay, oInputCtrl);
//Set screen
mainScreen = new MainScreen(oEngineCtrl, oInputCtrl, oCameraGUI, oCameraPlay, oGuiController);
this.setScreen(mainScreen);
}
示例3: newStage
import com.badlogic.gdx.utils.Scaling; //導入方法依賴的package包/類
private static Stage newStage() {
OrthographicCamera camera = new OrthographicCamera();
Viewport viewport = new ScalingViewport(Scaling.fillY, 320, 533, camera);
return new Stage(viewport);
}