use of com.talosvfx.talos.runtime.render.drawables.TextureRegionDrawable in project talos by rockbite.
the class RibbonModule method processValues.
@Override
public void processValues() {
RibbonRenderer renderer = (RibbonRenderer) outputValue.getDrawable();
TextureRegion mainRegion = null;
TextureRegion ribbonRegion = null;
if (!mainDrawableValue.isEmpty() && mainDrawableValue.getDrawable() != null) {
mainRegion = mainDrawableValue.getDrawable().getTextureRegion();
}
if (!ribbonDrawableValue.isEmpty() && ribbonDrawableValue.getDrawable() != null) {
if (ribbonDrawableValue.getDrawable() instanceof TextureRegionDrawable) {
ribbonRegion = ribbonDrawableValue.getDrawable().getTextureRegion();
} else if (ribbonDrawableValue.getDrawable() instanceof ShadedDrawable) {
renderer.setShadedDrawable((ShadedDrawable) ribbonDrawableValue.getDrawable());
}
}
renderer.setRegions(mainRegion, ribbonRegion);
}
Aggregations