mmb.beans.Colorable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
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);
}
}