Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 为什么我的玩家会从平铺的地图上掉下来?_Java_Eclipse_Libgdx_Game Physics_Tiled - Fatal编程技术网

Java 为什么我的玩家会从平铺的地图上掉下来?

Java 为什么我的玩家会从平铺的地图上掉下来?,java,eclipse,libgdx,game-physics,tiled,Java,Eclipse,Libgdx,Game Physics,Tiled,我被毒气熏死了。我这场比赛很快就要到期了。我制作了我的播放器,这样它就不会从属性为“blocked”的瓷砖上掉落或穿过瓷砖。我不知道为什么,但它不起作用。它一直在下降。请帮帮我。我急需帮助。你是我唯一的希望 这是我的播放器的代码。碰撞检测就在这上面。 包net.hasanbilal.prisonrevolutions.entities import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; import com.b

我被毒气熏死了。我这场比赛很快就要到期了。我制作了我的播放器,这样它就不会从属性为“blocked”的瓷砖上掉落或穿过瓷砖。我不知道为什么,但它不起作用。它一直在下降。请帮帮我。我急需帮助。你是我唯一的希望

这是我的播放器的代码。碰撞检测就在这上面。 包net.hasanbilal.prisonrevolutions.entities

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell;
import com.badlogic.gdx.math.Vector2;

public class Player extends Sprite implements InputProcessor {

    /** 
     * x and y velocity
     */
    private Vector2 velocity = new Vector2();

    //Speed is gravity times 2, meaning that the characters reach terminal velocity at 2 seconds
    private float speed = 19.6f;
    private float gravity = 9.8f;

    private boolean canJump;

    private TiledMapTileLayer cLayer;
    private String blockedKey = "blocked";

    public Player(Sprite s, TiledMapTileLayer cLayer) {
        super(s);
        this.cLayer = cLayer;
    }

    public void draw(SpriteBatch sb) {
        update(Gdx.graphics.getDeltaTime());
        super.draw(sb);

    }
    public void update(float delta) {
        velocity.y -= gravity * delta; //gravity to player


        //Terminal Velocity and Falling

        if(velocity.y > speed)
            velocity.y = speed;
        else if(velocity.y < speed)
            velocity.y = -speed;

        //saves old position for collision detection
        float preX = getX();
        float preY = getY();
        boolean collideX = false;
        boolean collideY = false;
        float tWidth = cLayer.getTileWidth();
        float tHeight = cLayer.getTileHeight();

        setX(getX() + velocity.x * delta);

        if (velocity.x < 0) {

            collideX = collidesLeft();

        } else if (velocity.x > 0) {

            collideX = collidesRight();

        }

        if (collideX) {
            setX(preX);
            velocity.x = 0;
        }




        setY(getY() + velocity.y * delta);



        if (velocity.y < 0) {

            canJump = collideY = collidesBottom();

        } else if (velocity.y > 0) {

            collideY = collidesTop();

        }

        if (collideY) {
            setY(preY);
            velocity.y = 0;
        }
    }



    public Vector2 getVelocity() {
        return velocity;
    }

    public void setVelocity(Vector2 velocity) {
        this.velocity = velocity;
    }

    public float getSpeed() {
        return speed;
    }

    public void setSpeed(float speed) {
        this.speed = speed;
    }

    public float getGravity() {
        return gravity;
    }

    public void setGravity(float gravity) {
        this.gravity = gravity;
    }

    public TiledMapTileLayer getcLayer() {
        return cLayer;
    }

    public void setcLayer(TiledMapTileLayer cLayer) {
        this.cLayer = cLayer;
    }

    private boolean isCellBlocked(float x, float y) {
        Cell cell = cLayer.getCell((int) (x / cLayer.getTileWidth()), (int) (y / cLayer.getTileHeight()));
        return cell != null && cell.getTile() != null && cell.getTile().getProperties().containsKey(blockedKey);
    }

    public boolean collidesRight() {
        for(float step = 0; step < getHeight(); step += cLayer.getTileHeight() / 2)
            if(isCellBlocked(getX() + getWidth(), getY() + step))
                return true;
        return false;
    }

    public boolean collidesLeft() {
        for(float step = 0; step < getHeight(); step += cLayer.getTileHeight() / 2)
            if(isCellBlocked(getX(), getY() + step))
                return true;
        return false;
    }

    public boolean collidesTop() {
        for(float step = 0; step < getWidth(); step += cLayer.getTileWidth() / 2)
            if(isCellBlocked(getX() + step, getY() + getHeight()))
                return true;
        return false;

    }

    public boolean collidesBottom() {
        for(float step = 0; step < getWidth(); step += cLayer.getTileWidth() / 2)
            if(isCellBlocked(getX() + step, getY()))
                return true;
        return false;
    }

    @Override
    public boolean keyDown(int arg0) {
        // TODO Auto-generated method stub
        return true;
    }

    @Override
    public boolean keyTyped(char arg0) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean keyUp(int arg0) {
        // TODO Auto-generated method stub
        return true;
    }

    @Override
    public boolean mouseMoved(int arg0, int arg1) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean scrolled(int arg0) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean touchDown(int arg0, int arg1, int arg2, int arg3) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean touchDragged(int arg0, int arg1, int arg2) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean touchUp(int arg0, int arg1, int arg2, int arg3) {
        // TODO Auto-generated method stub
        return false;
    }


}
导入com.badlogic.gdx.gdx;
导入com.badlogic.gdx.InputProcessor;
导入com.badlogic.gdx.graphics.g2d.Sprite;
导入com.badlogic.gdx.graphics.g2d.SpriteBatch;
导入com.badlogic.gdx.maps.tiled.tiledMartileLayer;
导入com.badlogic.gdx.maps.tiled.tiledMatpileLayer.Cell;
导入com.badlogic.gdx.math.Vector2;
公共类播放器扩展Sprite实现InputProcessor{
/** 
*x和y速度
*/
私有向量2速度=新向量2();
//速度是重力乘以2,这意味着角色在2秒时达到终点速度
私人浮动速度=19.6f;
私人浮子重力=9.8f;
私有布尔跳;
私人瓦片铺层机;
私有字符串blockedKey=“blocked”;
公共玩家(精灵s,TiledMatpileLayer cLayer){
超级(s);
this.cLayer=cLayer;
}
公开作废抽签(SpriteBatch sb){
更新(Gdx.graphics.getDeltaTime());
超级画(某人);
}
公共无效更新(浮动增量){
速度.y-=重力*delta;//重力对玩家
//终端速度和下降
如果(速度y>速度)
速度。y=速度;
否则如果(速度y<速度)
速度y=速度;
//保存碰撞检测的旧位置
float preX=getX();
飘浮的猎物=getY();
布尔值x=false;
布尔值y=false;
float tWidth=cLayer.getTileWidth();
float tHeight=cLayer.getTileHeight();
setX(getX()+速度x*delta);
if(速度x<0){
collideX=collidesLeft();
}否则,如果(速度x>0){
collideX=collidesRight();
}
如果(X){
setX(preX);
速度x=0;
}
setY(getY()+速度y*delta);
if(速度y<0){
canJump=collizey=collizesbottom();
}否则,如果(速度y>0){
collide=collide-stop();
}
如果(碰撞){
赛蒂(猎物);
速度y=0;
}
}
公共向量2 getVelocity(){
返回速度;
}
公共空间设置速度(矢量2速度){
速度=速度;
}
公共浮点getSpeed(){
返回速度;
}
公共无效设置速度(浮动速度){
速度=速度;
}
公共浮点数(){
返回重力;
}
公共空间重力(浮动重力){
重力=重力;
}
公共TiledMatpileLayer getcLayer(){
返泥机;
}
公共空隙沉降器(TiledMatpileLayer cLayer){
this.cLayer=cLayer;
}
私有布尔值isCellBlocked(浮点x,浮点y){
Cell-Cell=cLayer.getCell((int)(x/cLayer.getTileWidth()),(int)(y/cLayer.getTileHeight());
返回单元格!=null&&cell.getTile()!=null&&cell.getTile().getProperties().containsKey(blockedKey);
}
公共布尔碰撞右(){
对于(float step=0;step
这是平铺地图的代码。这是所有的瓷砖价值和属性

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.2" tiledversion="1.3.1" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="62" height="37" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
 <tileset firstgid="1" name="newTileSet" tilewidth="16" tileheight="16" tilecount="5" columns="10">
  <image source="newTileSet.png" width="160" height="16"/>
  <tile id="0">
   <properties>
    <property name="blocked" value=""/>
   </properties>
  </tile>
  <tile id="1">
   <properties>
    <property name="blocked" value=""/>
   </properties>
  </tile>
  <tile id="5">
   <properties>
    <property name="blocked" value=""/>
   </properties>
  </tile>
  <tile id="7">
   <properties>
    <property name="blocked" value=""/>
   </properties>
  </tile>
  <tile id="8">
   <properties>
    <property name="blocked" value=""/>
   </properties>
  </tile>
 </tileset>
 <layer id="2" name="Tile Layer 2" width="62" height="37">
  <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6,6,6,6,6,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,4,4,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
 </layer>
</map>

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.2" tiledversion="1.3.1" name="newTileSet" tilewidth="16" tileheight="16" tilecount="10" columns="10">
 <image source="newTileSet.png" width="160" height="16"/>
 <tile id="0">
  <properties>
   <property name="blocked" value=""/>
  </properties>
 </tile>
 <tile id="1">
  <properties>
   <property name="blocked" value=""/>
  </properties>
 </tile>
 <tile id="5">
  <properties>
   <property name="blocked" value=""/>
  </properties>
 </tile>
 <tile id="7">
  <properties>
   <property name="blocked" value=""/>
  </properties>
 </tile>
 <tile id="8">
  <properties>
   <property name="blocked" value=""/>
  </properties>
 </tile>
</tileset>
  if(velocity.y > speed)
        velocity.y = speed;
    else if(velocity.y < speed) // should be -speed
        velocity.y = -speed