diff --git a/core/assets/cursor.png b/core/assets/cursor.png index 92230ec..4360bb2 100644 Binary files a/core/assets/cursor.png and b/core/assets/cursor.png differ diff --git a/core/src/com/dungeoncrawler/control/Controller.java b/core/src/com/dungeoncrawler/control/Controller.java index ed43d65..a3075bd 100644 --- a/core/src/com/dungeoncrawler/control/Controller.java +++ b/core/src/com/dungeoncrawler/control/Controller.java @@ -98,8 +98,8 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ //PASSIERT IN GAMESCREEN if(m != null){ //ENTITIES - d.getPlayer().setxPos(m.getPlayerSpriteX()); - d.getPlayer().setyPos(m.getPlayerSpriteY()); + //d.getPlayer().setxPos(m.getPlayerSpriteX()); + //d.getPlayer().setyPos(m.getPlayerSpriteY()); if(v == null){ // Position des Players, etc. werden aktualisiert @@ -179,13 +179,15 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ switch(ent.getId()){ case 0: e[i] = new Archer(x,y,lvl); + e[i].startT(); m.newEntity(i,ent,x,y); - i = 10; + i = 11; break; case 1: e[i] = new Swordsman(x,y,lvl); + e[i].startT(); m.newEntity(i,ent,x,y); - i = 10; + i = 11; break; } } @@ -237,17 +239,11 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ else if(v.click() == 0){ v = null; m = new GameScreen(d); - Archer a = new Archer(0,0,0); - newEntity(a,96,96,0); - Archer w = new Archer(0,0,0); - newEntity(w,96,144,0); - Swordsman s = new Swordsman(0,0,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"); + newEntity(new Archer(0,0,0),96,96,0); + newEntity(new Archer(0,0,0),96,144,0); + newEntity(new Swordsman(0,0,0),288,96,0); + newEntity(new Swordsman(0,0,0),288,144,0); + newEntity(new Swordsman(0,0,0),48,144,0); } } } diff --git a/core/src/com/dungeoncrawler/model/Entity.java b/core/src/com/dungeoncrawler/model/Entity.java index e753c0f..36f90cb 100644 --- a/core/src/com/dungeoncrawler/model/Entity.java +++ b/core/src/com/dungeoncrawler/model/Entity.java @@ -147,6 +147,8 @@ public abstract class Entity { public void setFacing(int facing){ this.facing = facing; } + public void startT(){ + } diff --git a/core/src/com/dungeoncrawler/model/entities/Archer.java b/core/src/com/dungeoncrawler/model/entities/Archer.java index 155cd55..1f0636a 100644 --- a/core/src/com/dungeoncrawler/model/entities/Archer.java +++ b/core/src/com/dungeoncrawler/model/entities/Archer.java @@ -74,7 +74,7 @@ public class Archer extends Entity{ } } else{ - facing = 2; + //facing = 2; } } },0,1f); @@ -140,7 +140,7 @@ public class Archer extends Entity{ } },0,0.02f); tleft.stop(); - t.start(); + } private void setIsRunning(boolean n){ @@ -157,7 +157,10 @@ public class Archer extends Entity{ public void setTimerRuns(int n){ timerRuns = n; } - + @Override + public void startT(){ + t.start(); + } } diff --git a/core/src/com/dungeoncrawler/model/entities/Swordsman.java b/core/src/com/dungeoncrawler/model/entities/Swordsman.java index a0f93be..d7ef489 100644 --- a/core/src/com/dungeoncrawler/model/entities/Swordsman.java +++ b/core/src/com/dungeoncrawler/model/entities/Swordsman.java @@ -137,7 +137,6 @@ public class Swordsman extends Entity { } },0,0.03f); tleft.stop(); - t.start(); } private void setIsRunning(boolean n){ @@ -154,6 +153,9 @@ public class Swordsman extends Entity { public void setTimerRuns(int n){ timerRuns = n; } - + @Override + public void startT(){ + t.start(); + } } diff --git a/core/src/com/dungeoncrawler/view/MainMenu.java b/core/src/com/dungeoncrawler/view/MainMenu.java index 5f8ea52..39e927b 100644 --- a/core/src/com/dungeoncrawler/view/MainMenu.java +++ b/core/src/com/dungeoncrawler/view/MainMenu.java @@ -2,6 +2,7 @@ package com.dungeoncrawler.view; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.Sprite; @@ -41,6 +42,10 @@ public class MainMenu{ button.setX(wc - (button.getWidth()/2)); button.setY(400); + Pixmap pm = new Pixmap(Gdx.files.internal("cursor.png")); + Gdx.graphics.setCursor(Gdx.graphics.newCursor(pm, 0, 0)); + pm.dispose(); + //ENTITIES //CURSOR