mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-24 21:48:46 +07:00
Added support for per-layer shadow flag
Added support for per-layer shadow flag Set automatically for now based on blendMode
This commit is contained in:
parent
c98c3dc2c8
commit
add2ea22b5
@ -459,7 +459,7 @@ public class Animation extends BaseDrawable implements Pool.Poolable {
|
||||
if (handleBlends) batch.setBlendMode(BlendMode.SOLID, SHADOW_TINT);
|
||||
if (cof == null) {
|
||||
for (Layer layer : layers) {
|
||||
if (layer == null) continue;
|
||||
if (layer == null || !layer.shadow) continue;
|
||||
drawShadow(batch, layer, x, y);
|
||||
}
|
||||
} else if (frame < numFrames) {
|
||||
@ -558,6 +558,7 @@ public class Animation extends BaseDrawable implements Pool.Poolable {
|
||||
Color tint;
|
||||
Index transform;
|
||||
int transformColor;
|
||||
boolean shadow;
|
||||
|
||||
TextureRegion regions[][];
|
||||
|
||||
@ -588,6 +589,7 @@ public class Animation extends BaseDrawable implements Pool.Poolable {
|
||||
numFrames = dc.getNumFramesPerDir();
|
||||
transform = null;
|
||||
transformColor = 0;
|
||||
shadow = (blendMode != BlendMode.LUMINOSITY && blendMode != BlendMode.LUMINOSITY_TINT);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user