Back to project page proteus-sidescroller.
The source code is released under:
GNU General Public License
If you think the Android project proteus-sidescroller listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.bartholomew.proteus.tween; /*from w ww . j av a 2 s .co m*/ import aurelienribon.tweenengine.TweenAccessor; import com.badlogic.gdx.graphics.g2d.Sprite; public class SpriteAccessor implements TweenAccessor<Sprite> { public static final int ALPHA = 0; @Override public int getValues(Sprite target, int tweenType, float[] returnValues) { switch (tweenType){ case ALPHA: returnValues[0] = target.getColor().a; return 1; default: assert false; return -1; // Error if tweenType is unknown } } @Override public void setValues(Sprite target, int tweenType, float[] newValues) { switch (tweenType){ case ALPHA: target.setColor(target.getColor().r, target.getColor().g, target.getColor().b, newValues[0]); break; default: assert false; } } }