Merge branch 'sk7725-cool-drills'
This commit is contained in:
@@ -274,4 +274,13 @@ public class Drawf{
|
|||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws a sprite that should be lightwise correct. Provided sprite must be symmetrical. */
|
||||||
|
public static void spinSprite(TextureRegion region, float x, float y, float r){
|
||||||
|
r = Mathf.mod(r, 90f);
|
||||||
|
Draw.rect(region, x, y, r);
|
||||||
|
Draw.alpha(r / 90f);
|
||||||
|
Draw.rect(region, x, y, r - 90f);
|
||||||
|
Draw.alpha(1f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class Drill extends Block{
|
|||||||
public float updateEffectChance = 0.02f;
|
public float updateEffectChance = 0.02f;
|
||||||
|
|
||||||
public boolean drawRim = false;
|
public boolean drawRim = false;
|
||||||
|
public boolean drawSpinSprite = true;
|
||||||
public Color heatColor = Color.valueOf("ff5512");
|
public Color heatColor = Color.valueOf("ff5512");
|
||||||
public @Load("@-rim") TextureRegion rimRegion;
|
public @Load("@-rim") TextureRegion rimRegion;
|
||||||
public @Load("@-rotator") TextureRegion rotatorRegion;
|
public @Load("@-rotator") TextureRegion rotatorRegion;
|
||||||
@@ -314,7 +315,11 @@ public class Drill extends Block{
|
|||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.rect(rotatorRegion, x, y, timeDrilled * rotateSpeed);
|
if(drawSpinSprite){
|
||||||
|
Drawf.spinSprite(rotatorRegion, x, y, timeDrilled * rotateSpeed);
|
||||||
|
}else{
|
||||||
|
Draw.rect(rotatorRegion, x, y, timeDrilled * rotateSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class Fracker extends SolidPump{
|
|||||||
|
|
||||||
Drawf.liquid(liquidRegion, x, y, liquids.get(result) / liquidCapacity, result.color);
|
Drawf.liquid(liquidRegion, x, y, liquids.get(result) / liquidCapacity, result.color);
|
||||||
|
|
||||||
Draw.rect(rotatorRegion, x, y, pumpTime);
|
Drawf.spinSprite(rotatorRegion, x, y, pumpTime);
|
||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class SolidPump extends Pump{
|
|||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.rect(region, x, y);
|
Draw.rect(region, x, y);
|
||||||
Drawf.liquid(liquidRegion, x, y, liquids.total() / liquidCapacity, liquids.current().color);
|
Drawf.liquid(liquidRegion, x, y, liquids.total() / liquidCapacity, liquids.current().color);
|
||||||
Draw.rect(rotatorRegion, x, y, pumpTime * rotateSpeed);
|
Drawf.spinSprite(rotatorRegion, x, y, pumpTime * rotateSpeed);
|
||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
|
|||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
#needed for android compilation
|
#needed for android compilation
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
archash=e52908cb23da2dead7ac049a1f395bacda64007c
|
archash=cc2e0588e1a87c732d0d155fe24932ae43d641bf
|
||||||
|
|||||||
Reference in New Issue
Block a user