master
GammelJAN 6 years ago
parent de036f82c8
commit aadc0d8516

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

After

Width:  |  Height:  |  Size: 790 B

@ -200,6 +200,8 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
for(int k = 5; k < d.getCurrentEntities().length; k++){
if(d.getCurrentEntities()[k] == null){
Entity arrow = d.getCurrentEntities()[i].shoot((int) d.getPlayer().getxPos(), (int) d.getPlayer().getyPos());
arrow.setxPos(d.getCurrentEntities()[i].getxPos() + 32);
arrow.setyPos(d.getCurrentEntities()[i].getyPos() + 32);
d.getCurrentEntities()[k] = arrow;
gs.generateNewEntitySprite(arrow, k);
gs.entitySprites[i].resetAttackState();
@ -491,12 +493,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
}
if(keycode == Input.Keys.ESCAPE){
if(gs != null && gs.getIsLoading() == false){
if(gs != null && gs.getIsLoading() == false && isPaused == false){
stop();
}
}
if(keycode == Input.Keys.TAB){
if(gs != null && gs.getIsLoading() == false){
else if(gs != null && gs.getIsLoading() == false && isPaused == true){
resume();
}
}
@ -684,6 +684,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
gs.resume();
ps = null;
gs.startLoadingScreen();
}
}

@ -110,8 +110,8 @@ public class Archer extends Entity{
}
}
Arrow a = new Arrow(this.xPos, this.yPos, this.lvl, 0);
movementX = (int) (5 * Math.cos(alpha));
movementY = (int) (5 * Math.sin(alpha));
movementX = (int) (7 * Math.cos(alpha));
movementY = (int) (7 * Math.sin(alpha));
a.setMovementX(movementX);
a.setMovementY(movementY);

@ -20,6 +20,7 @@ import java.util.ArrayList;
public class GameScreen {
//PLAYER
Texture p;
EntitySprite player;
@ -77,6 +78,7 @@ public class GameScreen {
controls.setY(0);
*/
entities = d.getCurrentEntities();
//PLAYER
@ -215,8 +217,9 @@ public class GameScreen {
}
//MAP
tmr.setView(camera);
tmr.render();
tmr.setView(camera);
tmr.render();
camera.zoom = 700f; // Standart 700f
@ -224,7 +227,7 @@ public class GameScreen {
batch.setProjectionMatrix(camera.combined);
updateEntitySprites(e);
//BATCH
batch.begin();
@ -291,10 +294,10 @@ public class GameScreen {
}
if(e.getId() == 2){
tx[0] = new Texture("sprites/arrow.png");
entitySprites[i] = new EntitySprite(tx, 18, 9);
entitySprites[i] = new EntitySprite(tx, 36, 15);
}
entitySprites[i].update((int) e.getxPos(), (int) e.getyPos());
entitySprites[i].update((int) e.getxPos() + 32, (int) e.getyPos() + 32);
if(e.getId() == 2){
entitySprites[i].getSprites()[0].setRotation((float) Math.toDegrees(e.getAngle()));
@ -427,12 +430,11 @@ public class GameScreen {
public void stop(){
animations.stop();
animatePlayer.stop();
camera = null;
}
public void resume(){
animations.start();
animatePlayer.start();
}
}

Loading…
Cancel
Save