本文整理汇总了Java中com.badlogic.gdx.utils.viewport.Viewport.getWorldHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Viewport.getWorldHeight方法的具体用法?Java Viewport.getWorldHeight怎么用?Java Viewport.getWorldHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.utils.viewport.Viewport
的用法示例。
在下文中一共展示了Viewport.getWorldHeight方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport){
position = new Vector2();
// TODO: Set the initial velocity to zero in both directions
velocity = new Vector2(0, 0);
radius = viewport.getWorldWidth() * RADIUS_RATIO;
position.y = viewport.getWorldHeight() + radius;
Random random = new Random();
position.x = random.nextFloat() * (viewport.getWorldWidth() - 2 * radius) + radius;
}
示例2: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport) {
position = new Vector2(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2);
velocity = new Vector2();
radiusMultiplier = 1;
radius = BASE_RADIUS * radiusMultiplier;
randomKick();
}
示例3: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport){
position = new Vector2();
// TODO: Set the initial velocity to zero in both directions
velocity = new Vector2(0, -200);
radius = viewport.getWorldWidth() * RADIUS_RATIO;
position.y = viewport.getWorldHeight() + radius;
Random random = new Random();
position.x = random.nextFloat() * (viewport.getWorldWidth() - 2 * radius) + radius;
}
示例4: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport) {
position = new Vector2(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2);
velocity = new Vector2();
radiusMultiplier = 1;
radius = BASE_RADIUS * radiusMultiplier;
radiusMultiplier = 1;
}
示例5: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport) {
this.viewport = viewport;
position = new Vector2(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2);
velocity = new Vector2();
baseRadius = RADIUS_FACTOR * Math.min(viewport.getWorldWidth(), viewport.getWorldHeight());
radiusMultiplier = 1;
}
示例6: Menu
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public Menu(int fontRatio, Color c, String fontPath, Viewport viewport) {
super(viewport);
ftfp = new FreeTypeFontGenerator.FreeTypeFontParameter();
font = new BitmapFont();
ftfp.size = (int)viewport.getWorldHeight() / fontRatio; //the size can be change later
ftfp.color=c;
ftfg = new FreeTypeFontGenerator(Gdx.files.internal(fontPath));
font = ftfg.generateFont(ftfp);
//Skin skinMusique = new Skin();
//skinMusique.add("image", Gdx.files.internal("music64.png"));
//ImageButtonStyle bsMusique = new ImageButton.ImageButtonStyle();
//bsMusique.imageChecked = skinMusique.getDrawable("image");
}
示例7: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport) {
position = new Vector2(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2);
velocity = new Vector2();
radius = RADIUS_FACTOR * Math.min(viewport.getWorldWidth(), viewport.getWorldHeight());
randomKick();
}
示例8: init
import com.badlogic.gdx.utils.viewport.Viewport; //导入方法依赖的package包/类
public void init(Viewport viewport) {
position = new Vector2(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2);
velocity = new Vector2();
randomKick();
}