Created
September 21, 2014 03:59
-
-
Save cesarizu/d94445e51c8ba9f5aac9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.caih.juggler.elements | |
import aurelienribon.tweenengine.TweenAccessor | |
class BallAccessor implements TweenAccessor<Ball> { | |
public static final int POS_Y = 0 | |
@Override | |
int getValues(Ball ball, int i, float[] floats) { | |
switch (i) { | |
case POS_Y: | |
return ball.bounceY | |
default: | |
return 0 | |
} | |
} | |
@Override | |
void setValues(Ball ball, int i, float[] floats) { | |
switch (i) { | |
case POS_Y: | |
ball.bounceY = floats[0] | |
break | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment