Android Open Source - spaceShell Sprite Tween






From Project

Back to project page spaceShell.

License

The source code is released under:

MIT License

If you think the Android project spaceShell listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package fr.creationjeuxjava.tweenAccessors;
// w w  w. j  a  v  a2s  .  c  o  m
import aurelienribon.tweenengine.TweenAccessor;

import com.badlogic.gdx.graphics.g2d.Sprite;

/* SpriteTween.java by JohnCarmack, 16 fev. 2014 */

public class SpriteTween implements TweenAccessor<Sprite> {

  public static final int ALPHA = 1;

  @Override
  public int getValues(Sprite target, int tweenType, float[] returnValues) {
    switch (tweenType) {
    case ALPHA:
      returnValues[0] = target.getColor().a;
      return 1;
    default:
      return 0;
    }
  }

  @Override
  public void setValues(Sprite target, int tweenType, float[] newValues) {
    switch (tweenType) {
    case ALPHA:
      target.setColor(1, 1, 1, newValues[0]);
      break;
    }
  }
}




Java Source Code List

fr.creationjeuxjava.gui.MenuGui.java
fr.creationjeuxjava.screens.AbstractScreen.java
fr.creationjeuxjava.screens.MenuScreen.java
fr.creationjeuxjava.screens.OpenGLTriangleScreen.java
fr.creationjeuxjava.screens.SplashScreen.java
fr.creationjeuxjava.spaceshell.MainActivity.java
fr.creationjeuxjava.spaceshell.Main.java
fr.creationjeuxjava.spaceshell.MeshCreator.java
fr.creationjeuxjava.spaceshell.RobovmLauncher.java
fr.creationjeuxjava.spaceshell.SpaceShellGame.java
fr.creationjeuxjava.spaceshell.client.GwtLauncher.java
fr.creationjeuxjava.tweenAccessors.SpriteTween.java