You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
420 B
28 lines
420 B
10 years ago
|
package mightypork.rogue.world.events;
|
||
|
|
||
|
|
||
|
import mightypork.gamecore.eventbus.BusEvent;
|
||
|
import mightypork.rogue.world.World;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Toggle world pause state
|
||
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
|
public class WorldPauseRequest extends BusEvent<World> {
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected void handleBy(World handler)
|
||
|
{
|
||
|
// toggle paused state
|
||
|
if (!handler.isPaused()) {
|
||
|
handler.pause();
|
||
|
} else {
|
||
|
handler.resume();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|