angepasst an player

This commit is contained in:
Ivan
2014-11-26 11:38:25 +01:00
parent b7ec09a2ed
commit b0f96305e5
2 changed files with 5 additions and 6 deletions
@@ -42,7 +42,6 @@ public class ActionControl{
resetActionPanel(); resetActionPanel();
} }
public static void setAction(int rd){ public static void setAction(int rd){
System.out.println(" 33 "+Thread.currentThread());
setKeyA(); setKeyA();
if(rd==1){ if(rd==1){
option=1; option=1;
@@ -112,7 +111,7 @@ public class ActionControl{
}else{ }else{
resetActionPanel(); resetActionPanel();
actionLabel.setText("Manipulation erfolgreich!"); actionLabel.setText("Manipulation erfolgreich!");
HardewareManipulate.setHardware(MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).getCorrespondingHardwareToTrigger()); HardewareManipulate.setHardware(MapGrid.getGridCell(Main.getPlayer().getGridLocation().x, Main.getPlayer().getGridLocation().y).getCorrespondingHardwareToTrigger());
} }
} }
private static void setAchiv(){ private static void setAchiv(){
@@ -19,16 +19,16 @@ public class ActionWatcher{
} }
public static void tick(){ public static void tick(){
//Infotext, wenn man in der nhe von einem Hardwareteil steht //Infotext, wenn man in der nhe von einem Hardwareteil steht
if(MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).isTrigger() && !action && !setAction){ if(MapGrid.getGridCell(Main.getPlayer().getGridLocation().x, Main.getPlayer().getGridLocation().y).isTrigger() && !action && !setAction){
infoText=true; infoText=true;
if(!HardewareManipulate.getHardware(MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).getCorrespondingHardwareToTrigger())){ if(!HardewareManipulate.getHardware(MapGrid.getGridCell(Main.getPlayer().getGridLocation().x, Main.getPlayer().getGridLocation().y).getCorrespondingHardwareToTrigger())){
ActionControl.setTextforA(); ActionControl.setTextforA();
}else{ }else{
ActionControl.setTextforManipulate(); ActionControl.setTextforManipulate();
} }
} }
//Entfernt InfoText //Entfernt InfoText
if(!MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).isTrigger() && infoText){ if(!MapGrid.getGridCell(Main.getPlayer().getGridLocation().x, Main.getPlayer().getGridLocation().y).isTrigger() && infoText){
ActionControl.resetActionPanel(); ActionControl.resetActionPanel();
infoText=false; infoText=false;
} }
@@ -39,7 +39,7 @@ public class ActionWatcher{
ActionControl.setAction(new Random().nextInt(2)+1); ActionControl.setAction(new Random().nextInt(2)+1);
} }
//Entfernt jeglichen Text wenn man sich von dem Hardwarestck entfernt, nachdem Aktion bereits eingeleitet wurde, und setzt Booleans/Counter wieder auf die Ausgangssituation //Entfernt jeglichen Text wenn man sich von dem Hardwarestck entfernt, nachdem Aktion bereits eingeleitet wurde, und setzt Booleans/Counter wieder auf die Ausgangssituation
if(!MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).isTrigger() && setAction){ if(!MapGrid.getGridCell(Main.getPlayer().getGridLocation().x, Main.getPlayer().getGridLocation().y).isTrigger() && setAction){
ActionControl.resetActionPanel(); ActionControl.resetActionPanel();
ActionControl.resetKeyA(); ActionControl.resetKeyA();
infoText=false; infoText=false;