Walkable sprite help
I’m trying to make a sprite that is stationary at the start but once you click somewhere on the screen, it should move to that point automatically开发者_C百科 in a straight line, creating the walking effect. How do I do this?
Um, your question is a little vague, and therefore hard to answer. Generally speaking, you can make a translate animation as described here: http://developer.android.com/reference/android/view/animation/TranslateAnimation.html Or, you can just do the drawing yourself: record the location of the touch event, interpolate some positions between that location and your sprite's starting position, and draw some frames yourself.
精彩评论