ULTRA MERGE INCOMING

master
GammelJan 6 years ago
parent 21a6e1e973
commit d66c5a77c2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -98,8 +98,8 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
//PASSIERT IN GAMESCREEN //PASSIERT IN GAMESCREEN
if(m != null){ if(m != null){
//ENTITIES //ENTITIES
d.getPlayer().setxPos(m.getPlayerSpriteX()); //d.getPlayer().setxPos(m.getPlayerSpriteX());
d.getPlayer().setyPos(m.getPlayerSpriteY()); //d.getPlayer().setyPos(m.getPlayerSpriteY());
if(v == null){ if(v == null){
// Position des Players, etc. werden aktualisiert // Position des Players, etc. werden aktualisiert
@ -179,13 +179,15 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
switch(ent.getId()){ switch(ent.getId()){
case 0: case 0:
e[i] = new Archer(x,y,lvl); e[i] = new Archer(x,y,lvl);
e[i].startT();
m.newEntity(i,ent,x,y); m.newEntity(i,ent,x,y);
i = 10; i = 11;
break; break;
case 1: case 1:
e[i] = new Swordsman(x,y,lvl); e[i] = new Swordsman(x,y,lvl);
e[i].startT();
m.newEntity(i,ent,x,y); m.newEntity(i,ent,x,y);
i = 10; i = 11;
break; break;
} }
} }
@ -237,17 +239,11 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
else if(v.click() == 0){ else if(v.click() == 0){
v = null; v = null;
m = new GameScreen(d); m = new GameScreen(d);
Archer a = new Archer(0,0,0); newEntity(new Archer(0,0,0),96,96,0);
newEntity(a,96,96,0); newEntity(new Archer(0,0,0),96,144,0);
Archer w = new Archer(0,0,0); newEntity(new Swordsman(0,0,0),288,96,0);
newEntity(w,96,144,0); newEntity(new Swordsman(0,0,0),288,144,0);
Swordsman s = new Swordsman(0,0,0); newEntity(new Swordsman(0,0,0),48,144,0);
newEntity(s,288,96,0);
Swordsman p = new Swordsman(0,0,0);
newEntity(p,288,144,0);
Swordsman q = new Swordsman(0,0,0);
newEntity(q,48,144,0);
System.out.println("NICE");
} }
} }
} }

@ -147,6 +147,8 @@ public abstract class Entity {
public void setFacing(int facing){ public void setFacing(int facing){
this.facing = facing; this.facing = facing;
} }
public void startT(){
}

@ -74,7 +74,7 @@ public class Archer extends Entity{
} }
} }
else{ else{
facing = 2; //facing = 2;
} }
} }
},0,1f); },0,1f);
@ -140,7 +140,7 @@ public class Archer extends Entity{
} }
},0,0.02f); },0,0.02f);
tleft.stop(); tleft.stop();
t.start();
} }
private void setIsRunning(boolean n){ private void setIsRunning(boolean n){
@ -157,7 +157,10 @@ public class Archer extends Entity{
public void setTimerRuns(int n){ public void setTimerRuns(int n){
timerRuns = n; timerRuns = n;
} }
@Override
public void startT(){
t.start();
}
} }

@ -137,7 +137,6 @@ public class Swordsman extends Entity {
} }
},0,0.03f); },0,0.03f);
tleft.stop(); tleft.stop();
t.start();
} }
private void setIsRunning(boolean n){ private void setIsRunning(boolean n){
@ -154,6 +153,9 @@ public class Swordsman extends Entity {
public void setTimerRuns(int n){ public void setTimerRuns(int n){
timerRuns = n; timerRuns = n;
} }
@Override
public void startT(){
t.start();
}
} }

@ -2,6 +2,7 @@ package com.dungeoncrawler.view;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.Sprite;
@ -41,6 +42,10 @@ public class MainMenu{
button.setX(wc - (button.getWidth()/2)); button.setX(wc - (button.getWidth()/2));
button.setY(400); button.setY(400);
Pixmap pm = new Pixmap(Gdx.files.internal("cursor.png"));
Gdx.graphics.setCursor(Gdx.graphics.newCursor(pm, 0, 0));
pm.dispose();
//ENTITIES //ENTITIES
//CURSOR //CURSOR

Loading…
Cancel
Save