mmb.engine.item.RotableItem 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<
/**
*
*/
package mmb.engine.item;
import java.awt.image.BufferedImage;
import mmb.engine.rotate.RotatedImageGroup;
/**
* @author oskar
*
*/
public class RotableItem extends Item implements RotableItemEntry {
private RotatedImageGroup rig;
@Override
public void setTexture(BufferedImage texture) {
rig = RotatedImageGroup.create(texture);
super.setTexture(texture);
}
public RotableItem setTexture(RotatedImageGroup texture) {
rig = texture;
super.setTexture(texture.U);
return this;
}
/** @return the rotated texture */
@Override
public RotatedImageGroup rig() {
return rig;
}
}