Editor variant regions for wall blocks
This commit is contained in:
@@ -59,11 +59,7 @@ public class Wall extends Block{
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
if(variants == 0){
|
||||
Draw.rect(region, x, y);
|
||||
}else{
|
||||
Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], x, y);
|
||||
}
|
||||
super.draw();
|
||||
|
||||
//draw flashing white overlay if enabled
|
||||
if(flashHit){
|
||||
|
||||
@@ -74,7 +74,6 @@ public class Floor extends Block{
|
||||
|
||||
public Floor(String name){
|
||||
super(name);
|
||||
|
||||
variants = 3;
|
||||
}
|
||||
|
||||
@@ -133,19 +132,12 @@ public class Floor extends Block{
|
||||
@Override
|
||||
public void createIcons(MultiPacker packer){
|
||||
super.createIcons(packer);
|
||||
packer.add(PageType.editor, "editor-" + name, Core.atlas.getPixmap(fullIcon).crop());
|
||||
packer.add(PageType.editor, "editor-" + name, Core.atlas.getPixmap(fullIcon));
|
||||
|
||||
if(blendGroup != this){
|
||||
return;
|
||||
}
|
||||
|
||||
if(variants > 0){
|
||||
for(int i = 0; i < variants; i++){
|
||||
String rname = name + (i + 1);
|
||||
packer.add(PageType.editor, "editor-" + rname, Core.atlas.getPixmap(rname).crop());
|
||||
}
|
||||
}
|
||||
|
||||
PixmapRegion image = Core.atlas.getPixmap(icons()[0]);
|
||||
PixmapRegion edge = Core.atlas.getPixmap("edge-stencil");
|
||||
Pixmap result = new Pixmap(edge.width, edge.height);
|
||||
|
||||
Reference in New Issue
Block a user