mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-04 22:50:29 +07:00
Rotator spinSpeed
(#5881)
This commit is contained in:
parent
f8c7ff0159
commit
60b2842d82
@ -9,14 +9,15 @@ import mindustry.world.blocks.production.GenericCrafter.*;
|
||||
public class DrawRotator extends DrawBlock{
|
||||
public TextureRegion rotator, top;
|
||||
public boolean drawSpinSprite = false;
|
||||
public float spinSpeed = 2f;
|
||||
|
||||
@Override
|
||||
public void draw(GenericCrafterBuild build){
|
||||
Draw.rect(build.block.region, build.x, build.y);
|
||||
if(drawSpinSprite){
|
||||
Drawf.spinSprite(rotator, build.x, build.y, build.totalProgress * 2f);
|
||||
Drawf.spinSprite(rotator, build.x, build.y, build.totalProgress * spinSpeed);
|
||||
}else{
|
||||
Draw.rect(rotator, build.x, build.y, build.totalProgress * 2f);
|
||||
Draw.rect(rotator, build.x, build.y, build.totalProgress * spinSpeed);
|
||||
}
|
||||
if(top.found()) Draw.rect(top, build.x, build.y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user