Rogue: Savage Rats, a retro-themed dungeon crawler
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.
rogue-savage-rats/src/mightypork/rogue/world/events/WorldPauseRequest.java

28 lines
420 B

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();
}
}
}