Was vergessen

This commit is contained in:
Ivan
2014-11-12 22:31:35 +01:00
parent da2ca9318a
commit eb71410e80
2 changed files with 9 additions and 6 deletions
@@ -64,13 +64,13 @@ public class ActionControl{
}
}else{
afterTime=System.nanoTime()-beforeTime;
count=0;
time=!time;
ActionWatcher.setAction(false);
if(afterTime>8_000_000_000L){
actionLabel.setText("Fehlgeschlagen");
}else{
actionLabel.setText("Manipulation erfolgreich!");
count=0;
time=!time;
ActionWatcher.setAction(false);
HardewareManipulate.setHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger());
}
}
@@ -25,9 +25,12 @@ public class ActionWatcher{
}
public static void tick(){
//Taucht auf, falls man in der Näche von einem Hardwareteil steht
if(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).isTrigger() && !action && !setaction
&& !HardewareManipulate.getHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger())){
ActionControl.actionLabel.setText("Taste A druecken");
if(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).isTrigger() && !action && !setaction){
if(!HardewareManipulate.getHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger())){
ActionControl.actionLabel.setText("Taste A druecken");
}else{
ActionControl.actionLabel.setText("Bereits Manipuliert");
}
}
//Entfernt jeglichen Text wenn man sich von dem Hardwarestück entfernt und noch nicht A gedrückt hat
if(!MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).isTrigger() && !action && !setaction){