Skip to content
Snippets Groups Projects
Commit cdacf419 authored by Matthieu Amet's avatar Matthieu Amet
Browse files

Imports inutiles et correction d'un bug de saut mobile

parent 252a5cea
Branches master
No related tags found
No related merge requests found
android/assets/images/gem_particles.png

70.1 KiB

......@@ -39,6 +39,10 @@ public class PlayerController implements InputProcessor
{
keyHold = Input.Keys.LEFT;
}
if(pointer == 1)
{
keyHold = Input.Keys.UP;
}
return false;
}
......
package fr.iiztp.platventure.gamedata;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef;
......
......@@ -10,7 +10,6 @@ import fr.iiztp.platventure.gamedata.GameState;
import fr.iiztp.platventure.gamedata.Material;
import fr.iiztp.platventure.gamedata.MaterialType;
import fr.iiztp.platventure.gamedata.SoundTable;
import fr.iiztp.platventure.models.MapModel;
import fr.iiztp.platventure.models.PlayerModel;
import fr.iiztp.platventure.views.MapView;
import fr.iiztp.platventure.views.PlatVenture;
......
......@@ -9,9 +9,7 @@ import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.ParticleEffect;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
......@@ -95,7 +93,7 @@ public class MapView implements Screen {
playerBody.applyForceToCenter(-1f, 0f, false);
mapModel.getPlayer().getPlayerBlock().flip(true);
}
else if(playerController.getKeyHold() == Input.Keys.W || playerController.getKeyHold() == Input.Keys.UP || Gdx.input.isTouched(1))
else if(playerController.getKeyHold() == Input.Keys.W || playerController.getKeyHold() == Input.Keys.UP)
{
playerBody.applyForceToCenter(0f, 50f, false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment