Skip to content

Commit de1bcb3

Browse files
committed
FIX: Add WHITE tint to Sprite actor when anim if the actor doesn't have
it.
1 parent 7a31117 commit de1bcb3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

blade-engine/src/com/bladecoder/engine/anim/SpriteAlphaTween.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
******************************************************************************/
1616
package com.bladecoder.engine.anim;
1717

18+
import com.badlogic.gdx.graphics.Color;
1819
import com.badlogic.gdx.utils.Json;
1920
import com.badlogic.gdx.utils.JsonValue;
2021
import com.bladecoder.engine.actions.ActionCallback;
@@ -36,6 +37,9 @@ public void start(SpriteActor target, Type repeatType, int count, float tAlpha,
3637

3738
setTarget(target);
3839

40+
if(target.getTint() == null)
41+
target.setTint(Color.WHITE.cpy());
42+
3943
startAlpha = target.getTint().a;
4044
targetAlpha = tAlpha;
4145

blade-engine/src/com/bladecoder/engine/anim/SpriteTintTween.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public void start(SpriteActor target, Type repeatType, int count, Color tColor,
3737

3838
setTarget(target);
3939

40+
if(target.getTint() == null)
41+
target.setTint(Color.WHITE.cpy());
42+
4043
startColor = target.getTint().cpy();
4144
targetColor = tColor.cpy();
4245

0 commit comments

Comments
 (0)