本文整理了Java中com.badlogic.gdx.math.Rectangle.getHeight
方法的一些代码示例,展示了Rectangle.getHeight
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.getHeight
方法的具体详情如下:
包路径:com.badlogic.gdx.math.Rectangle
类名称:Rectangle
方法名:getHeight
暂无
代码示例来源:origin: libgdx/libgdx
gridWidth = boundRect.getWidth() / density;
gridHeight = regionAspectRatio * gridWidth;
rows = (int) Math.ceil(boundRect.getHeight() / gridHeight);
代码示例来源:origin: libgdx/libgdx
gridWidth = boundRect.getWidth() / density;
gridHeight = regionAspectRatio * gridWidth;
rows = (int) Math.ceil(boundRect.getHeight() / gridHeight);
代码示例来源:origin: danialgoodwin/dev
@Override
public void draw(Batch batch, float parentAlpha) {
super.draw(batch, parentAlpha);
batch.draw(textureRegion, textureRegionBounds1.x, screenRectangle.y, screenRectangle.getWidth(),
screenRectangle.getHeight());
batch.draw(textureRegion, textureRegionBounds2.x, screenRectangle.y, screenRectangle.getWidth(),
screenRectangle.getHeight());
}
代码示例来源:origin: Catacomb-Snatch/Catacomb-Snatch
@Override
public void update(boolean resize) {
if (viewport == null || !resize) return;
viewport.x -= viewport.width / 2f;
viewport.y -= viewport.height / 2f;
panel.setPosition((viewport.getWidth() - panel.getWidth()) / 2, viewport.getHeight() - panel.getHeight());
miniMap.update(true);
}
代码示例来源:origin: BrentAureli/SuperMario
public InteractiveTileObject(PlayScreen screen, MapObject object){
this.object = object;
this.screen = screen;
this.world = screen.getWorld();
this.map = screen.getMap();
this.bounds = ((RectangleMapObject) object).getRectangle();
BodyDef bdef = new BodyDef();
FixtureDef fdef = new FixtureDef();
PolygonShape shape = new PolygonShape();
bdef.type = BodyDef.BodyType.StaticBody;
bdef.position.set((bounds.getX() + bounds.getWidth() / 2) / MarioBros.PPM, (bounds.getY() + bounds.getHeight() / 2) / MarioBros.PPM);
body = world.createBody(bdef);
shape.setAsBox(bounds.getWidth() / 2 / MarioBros.PPM, bounds.getHeight() / 2 / MarioBros.PPM);
fdef.shape = shape;
fixture = body.createFixture(fdef);
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
y = boundingRectangle.getY() + boundingRectangle.getHeight();
代码示例来源:origin: com.badlogicgames.gdx/gdx
gridWidth = boundRect.getWidth() / density;
gridHeight = regionAspectRatio * gridWidth;
rows = (int) Math.ceil(boundRect.getHeight() / gridHeight);
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
unprojectTmp.set(r.getX() + r.getWidth() / 2, r.getY() + r.getHeight() / 2, 0);
world.getSceneCamera().scene2screen(worldViewport, unprojectTmp);
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
unprojectTmp.set(r.getX() + r.getWidth() / 2, r.getY() + r.getHeight() / 2, 0);
world.getSceneCamera().scene2screen(viewport, unprojectTmp);
代码示例来源:origin: BrentAureli/SuperMario
bdef.position.set((rect.getX() + rect.getWidth() / 2) / MarioBros.PPM, (rect.getY() + rect.getHeight() / 2) / MarioBros.PPM);
shape.setAsBox(rect.getWidth() / 2 / MarioBros.PPM, rect.getHeight() / 2 / MarioBros.PPM);
fdef.shape = shape;
body.createFixture(fdef);
bdef.position.set((rect.getX() + rect.getWidth() / 2) / MarioBros.PPM, (rect.getY() + rect.getHeight() / 2) / MarioBros.PPM);
shape.setAsBox(rect.getWidth() / 2 / MarioBros.PPM, rect.getHeight() / 2 / MarioBros.PPM);
fdef.shape = shape;
fdef.filter.categoryBits = MarioBros.OBJECT_BIT;
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
float y = boundingRectangle.getY() + boundingRectangle.getHeight();
float y = boundingRectangle.getY() + boundingRectangle.getHeight();
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
Rectangle boundingRectangle = bbox.getBoundingRectangle();
width = boundingRectangle.getWidth();
height = boundingRectangle.getHeight();
return;
内容来源于网络,如有侵权,请联系作者删除!