當前位置: 首頁>>代碼示例>>Java>>正文


Java Scaling.fillY方法代碼示例

本文整理匯總了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);
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:8,代碼來源:SplashMenu.java

示例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);
}
 
開發者ID:unlimitedggames,項目名稱:gdxjam-ugg,代碼行數:34,代碼來源:GDXJam.java

示例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);
}
 
開發者ID:sixro,項目名稱:minihabits,代碼行數:6,代碼來源:MainView.java


注:本文中的com.badlogic.gdx.utils.Scaling.fillY方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。