GammelJAN 5 years ago
parent bcf6734a07
commit d483fab4a4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

After

Width:  |  Height:  |  Size: 980 B

@ -125,8 +125,8 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3037,3038,3037,3038,3037,3038,3962,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,6300,6301,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3962,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,6316,6317,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3803,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,7032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3962,0,0,0,3962,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2195,2196,0,0,0,0,2255,0,0,3803,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,7032,0,0,0,0,0,0,0,0,0,0,0,6451,6454,0,6487,0,0,3962,0,0,0,3962,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2195,2196,6467,6470,6520,6503,2255,0,0,3803,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2077,2078,2256,2137,0,0,2078,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2256,2138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -179,8 +179,8 @@
0,0,0,2935,2936,2937,2938,2939,2940,2941,2942,0,0,0,0,0,2580,2581,2582,2935,2936,2937,2938,2939,2223,2224,2224,2224,2224,2224,2225,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2640,2641,2642,0,0,0,0,0,2283,2284,2284,2284,2284,2284,2285,0,0,0,0,3743,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3743,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2076,2135,2075,2198,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6487,0,0,0,3743,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

@ -181,7 +181,7 @@ public class Textbox extends Actor{
batch.begin();
font.draw(batch, toPrint.substring(0, (int)printChar), getX()+2, getY()+getHeight()-3, getWidth(), alignment, true);
font.draw(batch, toPrint.substring(0, (int)printChar), getX()+6, getY()+getHeight()-3, getWidth()-8, alignment, true);
if(state == 1){
for(int i = 0; i < ans.length; i++){

@ -57,7 +57,7 @@ public class GameScreen extends AbstractScreen{
Player a = map.getPlayer();
map.getStage().getCamera().position.set((a.getX()+a.getWidth()/2), (a.getY()+a.getHeight()/2), 0);
map.getStage().getCamera().update();
//map.getStage().getCamera().update();
}
@Override

@ -51,7 +51,7 @@ public class MovingNpc extends Actor{
String dialoguePath;
Texture questBubble;//= new Texture("textureData/sprites/questbubble.png");
private AnimatedSprite questBubble;
public MovingNpc(Rectangle area, float xPos, float yPos, int id, int mapId, String texture){
setName("npc");
@ -59,7 +59,8 @@ public class MovingNpc extends Actor{
this.mapId = mapId;
Texture t = new Texture(Gdx.files.internal("textureData/sprites/"+texture));
questBubble = new Texture("textureData/sprites/questbubble.png");
questBubble = new AnimatedSprite(new Texture("textureData/sprites/questbubble.png"), 32, 32, false);
questBubble.setRow(0);
currentlyTalking = false;
specialDialogue = false;
@ -174,6 +175,7 @@ public class MovingNpc extends Actor{
movementY = movement.y;
}
if(movementX == 0 && movementY == 0){
}
@ -181,23 +183,27 @@ public class MovingNpc extends Actor{
setY(getY()+movementY);
if(collidingWithMapCollisionObject()){
setY(getY()-movementY);
POI = null;
}
}
else if(movementY == 0 && movementX != 0){
setX(getX()+movementX);
if(collidingWithMapCollisionObject()){
setX(getX()-movementX);
POI = null;
}
}
else if(movementX != 0 && movementY != 0){
setX(getX()+ (movementX));
if(collidingWithMapCollisionObject()){
setX(getX() - (movementX));
POI = null;
}
setY(getY() + (movementY));
if(collidingWithMapCollisionObject()){
setY(getY()- (movementY));
POI = null;
}
}
@ -216,7 +222,7 @@ public class MovingNpc extends Actor{
}
@Override
public void draw(Batch batch, float parentAlpha) {
public void draw(Batch batch, float delta) {
animatedSprite.draw(batch);
for(Actor a : getStage().getActors()){
@ -224,7 +230,9 @@ public class MovingNpc extends Actor{
for(Quest quest : ((Player)a).getQuests()){
if(quest instanceof InformationQuest){
if(((InformationQuest)quest).hasSpecialDialogue(id, mapId)){
batch.draw(questBubble, getX()-8, getY() + getHeight() - 16);
questBubble.setSpritePosition((int)(getX()-8), (int)(getY() + getHeight() - 16));
questBubble.updateAnimation(0.01f);
questBubble.draw(batch);
break;
}
}
@ -235,7 +243,7 @@ public class MovingNpc extends Actor{
super.draw(batch, parentAlpha); //To change body of generated methods, choose Tools | Templates.
super.draw(batch, delta); //To change body of generated methods, choose Tools | Templates.
}
public boolean collidingWithMapCollisionObject(){

Loading…
Cancel
Save