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{ }else{
afterTime=System.nanoTime()-beforeTime; afterTime=System.nanoTime()-beforeTime;
count=0;
time=!time;
ActionWatcher.setAction(false);
if(afterTime>8_000_000_000L){ if(afterTime>8_000_000_000L){
actionLabel.setText("Fehlgeschlagen"); actionLabel.setText("Fehlgeschlagen");
}else{ }else{
actionLabel.setText("Manipulation erfolgreich!"); actionLabel.setText("Manipulation erfolgreich!");
count=0;
time=!time;
ActionWatcher.setAction(false);
HardewareManipulate.setHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger()); HardewareManipulate.setHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger());
} }
} }
@@ -25,9 +25,12 @@ public class ActionWatcher{
} }
public static void tick(){ public static void tick(){
//Taucht auf, falls man in der Näche von einem Hardwareteil steht //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 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())){ if(!HardewareManipulate.getHardware(MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).getCorrespondingHardwareToTrigger())){
ActionControl.actionLabel.setText("Taste A druecken"); 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 //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){ if(!MapGrid.getGridCell(GameLoopD.player01.getGridLocation().x, GameLoopD.player01.getGridLocation().y).isTrigger() && !action && !setaction){