Crystal blocks

This commit is contained in:
Anuken
2022-01-19 21:24:02 -05:00
parent 4bee7e598b
commit 45178046d0
10 changed files with 21 additions and 2 deletions
@@ -11,6 +11,7 @@ public class TallBlock extends Block{
public float shadowOffset = -3f;
public float layer = Layer.power + 1;
public float rotationRand = 20f;
public float shadowAlpha = 0.6f;
public TallBlock(String name){
super(name);
@@ -30,7 +31,7 @@ public class TallBlock extends Block{
float rot = Mathf.randomSeedRange(tile.pos() + 1, rotationRand);
Draw.z(Layer.power - 1);
Draw.color(0f, 0f, 0f, 0.6f);
Draw.color(0f, 0f, 0f, shadowAlpha);
Draw.rect(variants > 0 ? variantShadowRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantShadowRegions.length - 1))] : customShadowRegion,
tile.worldx() + shadowOffset, tile.worldy() + shadowOffset, rot);