我正在使用Slick2d创建一个自上而下的游戏,但是一个长方形比我在显示器上画的要快,向左移动比向右移动快,向上比向下移动快。
我正在更新这样的框架:
public void update(GameContainer gameContainer, int delta) throws SlickException {
player = new Rectangle(playerX, playerY, 10, 20);
if (gameContainer.getInput().isKeyDown(Input.KEY_LEFT)) {
x -= delta * 0.
<form style="background-color:pink; height:100px">
<label for="button-test">Add your name here</label>
<input type="text" id="button-test" name="button" placeholder="add your name here">
<div style="di
这里,您可以在我的页面中看到浮动的问题:左转。我为wordpress制作了一个样式,在那里我有指向页面和子页面的链接。
"PC a internet,Grafika,Programování“的链接应该在同一条线路上(右图)。我在style.css中添加了"float:left“,菜单没有问题,但不幸的是,标题"PC a internet”已经向上移动了一行(见右图)。我不想把它放在那里。
📷
浮子的使用可能有点棘手,有人能给我建议如何纠正它吗?
谢谢。
我从堆栈溢出应答first answer 实现了这个函数,
//method to move the view up/down whenever the keyboard is shown/dismissed
-(void)setViewMovedUp:(BOOL)movedUp
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3]; // if you want to slide up the view
CGRect rect = self.view.frame;