开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜