From 733cfe941b6fa3cbaf3e7fa7ff1f273c09514813 Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Thu, 9 Apr 2020 11:25:35 +0200 Subject: [PATCH] Fehler verbessert --- core/src/com/dungeoncrawler/model/Entity.java | 18 +++++++++--------- core/src/com/dungeoncrawler/view/MainMenu.java | 4 ++-- core/src/com/dungeoncrawler/view/View.java | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/src/com/dungeoncrawler/model/Entity.java b/core/src/com/dungeoncrawler/model/Entity.java index 187b415..5c35228 100644 --- a/core/src/com/dungeoncrawler/model/Entity.java +++ b/core/src/com/dungeoncrawler/model/Entity.java @@ -43,7 +43,7 @@ public abstract class Entity { public void rdmMove(float xPlayer, float yPlayer){ if(xPlayer == xPos){ //PLAYER auf X-Achse von Archer if(yPlayer == yPos){} // //PLAYER pos = Archer pos - else if(yPlayer > yPos){movementY = -1f;} // //PLAYER über Archer + else if(yPlayer > yPos){movementY = -1f;} // //PLAYER ueber Archer else if(yPlayer < yPos){movementY = 1f;} // //PLAYER unter Archer } // else if(yPlayer == yPos){ //PLAYER auf Y-Achse von Archer @@ -53,36 +53,36 @@ public abstract class Entity { } // else if(xPlayer > xPos){ //PLAYER rechts von Archer if(yPlayer > yPos){ // //PLAYER ist im Quadrant I - if((yPlayer - yPos) > (xPlayer - xPos)){ // // //Weg zu PLAYER x kürzer als zu PLAYER y + if((yPlayer - yPos) > (xPlayer - xPos)){ // // //Weg zu PLAYER x kuerzer als zu PLAYER y movementX = 1f; // // // } // // // - else{ // // //Weg zu PLAYER y kürzer als zu PLAYER x + else{ // // //Weg zu PLAYER y kuerzer als zu PLAYER x movementY = 1f; // // } // // } // // else if(yPlayer < yPos){ // //PLAYER ist im Quadrant II - if((yPos - yPlayer) > (xPlayer - xPos)){ // //Weg zu PLAYER x kürzer als zu PLAYER y + if((yPos - yPlayer) > (xPlayer - xPos)){ // //Weg zu PLAYER x kuerzer als zu PLAYER y movementX = 1f; // // } // // - else{ // //Weg zu PLAYER y kürzer als zu PLAYER y + else{ // //Weg zu PLAYER y kuerzer als zu PLAYER y movementY = -1f; // } // } // } // else if(xPlayer < xPos){ //PLAYER links von Archer if(yPlayer < yPos){ // //PLAYER ist im Quadrant III - if((yPlayer - yPos) > (xPlayer - xPos)){ // // //Weg zu PLAYER x kürzer als zu PLAYER y + if((yPlayer - yPos) > (xPlayer - xPos)){ // // //Weg zu PLAYER x kuerzer als zu PLAYER y movementX = -1f; // // // } // // // - else{ // // //Weg zu PLAYER y kürzer als zu PLAYER x + else{ // // //Weg zu PLAYER y kuerzer als zu PLAYER x movementY = -1f; // // } // // } // // else if(yPlayer > yPos){ // //PLAYER ist im Quadrant IV - if((yPlayer - yPos) > (xPos - xPlayer)){ // //Weg zu PLAYER x kürzer als zu PLAYER y + if((yPlayer - yPos) > (xPos - xPlayer)){ // //Weg zu PLAYER x kuerzer als zu PLAYER y movementX = -1; // // } // // - else{ // //Weg zu PLAYER y kürzer als zu PLAYER x + else{ // //Weg zu PLAYER y kuerzer als zu PLAYER x movementY = 1; // } //////////// } diff --git a/core/src/com/dungeoncrawler/view/MainMenu.java b/core/src/com/dungeoncrawler/view/MainMenu.java index 72e1e0c..5f8ea52 100644 --- a/core/src/com/dungeoncrawler/view/MainMenu.java +++ b/core/src/com/dungeoncrawler/view/MainMenu.java @@ -96,12 +96,12 @@ public class MainMenu{ CursorMoveX = 0f; break; } } - public int click(){ // prüft ob cursor mit button (START) überlappt + public int click(){ // prueft ob cursor mit button (START) ueberlappt Rectangle rectangleCursor = cursor.getBoundingRectangle(); Rectangle rectangleButton = button.getBoundingRectangle(); boolean overlapsPlay = rectangleCursor.overlaps(rectangleButton); if(overlapsPlay == true){ - return 0; // ints weil für mehr buttons eine ID festgelegt werden kann. 0 = START - -1 = kein button + return 0; // ints weil fuer mehr buttons eine ID festgelegt werden kann. 0 = START - -1 = kein button } else{return -1;} } diff --git a/core/src/com/dungeoncrawler/view/View.java b/core/src/com/dungeoncrawler/view/View.java index edc5da6..917919c 100644 --- a/core/src/com/dungeoncrawler/view/View.java +++ b/core/src/com/dungeoncrawler/view/View.java @@ -112,7 +112,7 @@ public class View { //BATCH batch.begin(); player.draw(batch); - //DRAW'T JEDES ENTITY - prüft vorher ob vorhanden + //DRAW'T JEDES ENTITY - prueft vorher ob vorhanden for(int i = 0; i < e.length; i++){ if(entitySprites[i] != null){ entitySprites[i].setX(e[i].getxPos());