All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.engine.GameEvents Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

There is a newer version: 0.6
Show newest version
/**
 * 
 */
package mmb.engine;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.pploder.events.Event;

import io.vavr.Tuple2;
import mmb.NN;
import mmb.engine.debug.Debugger;
import mmb.engine.worlds.universe.Universe;
import mmb.engine.worlds.world.World;

/**
 * A collection of game-wide events
 * @author oskar
 */
public class GameEvents {
	private GameEvents() {}
	@NN private static final Debugger debug = new Debugger("EVENTS");
	
	//Universes
	/** Invoked when a universe is created */
	@NN public static final Event onUniverseCreate = new CatchingEvent<>(debug, "Failed to process universe created event");
	/** Invoked after a universe is loaded (includes a node to load from)*/
	@NN public static final Event> onUniverseLoad = new CatchingEvent<>(debug, "Failed to process universe loaded event");
	/** Invoked when a universe is saved (includes a node to save to)*/
	@NN public static final Event> onUniverseSave = new CatchingEvent<>(debug, "Failed to process universe saved event");
	/** Invoked when a universe is shut down */
	@NN public static final Event onUniverseDie = new CatchingEvent<>(debug, "Failed to process universe died event");
	
	//Worlds
	/** Invoked when a world is created */
	@NN public static final Event onWorldCreate = new CatchingEvent<>(debug, "Failed to process world created event");
	/** Invoked after a world is loaded (includes a node to load from)*/
	@NN public static final Event> onWorldLoad = new CatchingEvent<>(debug, "Failed to process world loaded event");
	/** Invoked when a world is saved (includes a node to save to)*/
	@NN public static final Event> onWorldSave = new CatchingEvent<>(debug, "Failed to process world saved event");
	/** Invoked when a world is shut down */
	@NN public static final Event onWorldDie = new CatchingEvent<>(debug, "Failed to process world died event");
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy