Hey i want to create a methode that pauses for some seconds but isn't stopping the act(). What I tried now was
the probleme here is at higher numbers it gets stuck at some point for a few seconds and the problem I had with Greenfoot.delay() is that it stops the complete act() for this time.
Any solutions?
I have a programm where u shoot arrows and you can only shoot another arrow if the first is gone but i want just a one sec timer instead.
Programm
The Probleme is if u get close the enemy is dead way to fast.
1 2 3 4 5 6 7 8 | public void timer( int delay) { delay = delay * 100000 / 2 ; // to get a higher timer (now 1 nearly 1 sec) for ( int t = delay; t != 0 ; t--) { System.out.println(t); // to see how long the timer is } } |