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

mmb.beans.Colorable 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<

The newest version!
/**
 * 
 */
package mmb.beans;

import java.awt.Color;

import mmb.NN;
import mmb.data.variables.Variable;

/**
 * An object which has a color.
 * Objects with this type can be painted with a paintbrush
 * @author oskar
 */
public interface Colorable {
	/**
	 * @return current color
	 */
	@NN public Color getColor();
	/**
	 * Sets the color of the object
	 * @param c new color
	 */
	public void setColor(Color c);
	/**
	 * @return this object's color as a variable object
	 */
	@NN public default Variable getColorVariable(){
		return Variable.delegate(this::getColor, this::setColor);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy