Misc.log("Update");
if (time >= 1000) {
Misc.log("Time");
}
where Misc has this function:
public static void log(String msg) {
Date date = new Date();
System.out.println("[" + new Timestamp(date.getTime()) + "] " + msg);
}
Time is a float that increses with my delta time (which is calculated in millieseconds) so after one second it should pass into the if state as well (it’s in my game loop)
I tested it with outputs to see what in my code isn’t working.
with both Misc.log(); calls arround the if statement both get called, however if I remove the Misc.log(“Update”); it doesn’t ever output “Time” in my console, nothing else changed, why is this and how can i fix it?
Without both the code inside that if() doesn’T get called either