mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-12 03:37:27 +07:00
Enum follows camelCase rules
This commit is contained in:
parent
fbb317aa11
commit
2b04ebb14d
@ -26,9 +26,9 @@ public interface Autotiler{
|
||||
* The mode to slice a texture at.
|
||||
*/
|
||||
enum SliceMode{
|
||||
NO_SLICE,
|
||||
BOTTOM,
|
||||
TOP
|
||||
noSlice,
|
||||
bottom,
|
||||
top
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,7 +39,7 @@ public interface Autotiler{
|
||||
* @return The sliced texture
|
||||
*/
|
||||
default TextureRegion sliced(TextureRegion input, SliceMode mode){
|
||||
return mode == SliceMode.NO_SLICE ? input : mode == SliceMode.BOTTOM ? botHalf(input) : topHalf(input);
|
||||
return mode == SliceMode.noSlice ? input : mode == SliceMode.bottom ? botHalf(input) : topHalf(input);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,7 +124,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
int dir = rotation - i;
|
||||
float rot = i == 0 ? rotation * 90 : (dir)*90;
|
||||
|
||||
Draw.rect(sliced(regions[0][frame], i != 0 ? SliceMode.BOTTOM : SliceMode.TOP), x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, rot);
|
||||
Draw.rect(sliced(regions[0][frame], i != 0 ? SliceMode.bottom : SliceMode.top), x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, rot);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,14 +88,14 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
||||
if((blending & (1 << i)) != 0){
|
||||
int dir = r - i;
|
||||
float rot = i == 0 ? rotation : (dir)*90;
|
||||
drawAt(x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, 0, rot, i != 0 ? SliceMode.BOTTOM : SliceMode.TOP);
|
||||
drawAt(x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, 0, rot, i != 0 ? SliceMode.bottom : SliceMode.top);
|
||||
}
|
||||
}
|
||||
|
||||
Draw.z(Layer.block);
|
||||
|
||||
Draw.scl(xscl, yscl);
|
||||
drawAt(x, y, blendbits, rotation, SliceMode.NO_SLICE);
|
||||
drawAt(x, y, blendbits, rotation, SliceMode.noSlice);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user