如何在 Android 应用程序中移动 pacman?
我使用二维数组绘制了迷宫画布。 现在我想知道
1.如何显示pacman动画(在j2me中我们可以在一定程度上填充圆圈)?
2.pacman如何移动并吃食物意味着当pacman移动时屏幕会被重新绘制?
谢谢
i have painted canvas for maze using two dimensional array.
now i want to know
1.how i can show pacman animated(in j2me we can fill the circles by some degrees)?
2.how the pacman moves and eat the food means when pacman moves the screen will be repainted?
thankx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先按照此处的图形教程进行操作。特别是“玩图形”系列。如果您有具体问题,请来这里询问。否则,“我怎样才能制作一款游戏,让某事发生并且某某动画化”的问题通常是不受欢迎的。
Start by following the graphics tutorials here. Particularly the "Playing with Graphics" series. If you have a specific problem, come here and ask it. Otherwise, questions asking "How can I make a game where such-and-such happens and so-and-so is animated" are generally not welcome.
您可以尝试 flixel-android lib(特别是如果您熟悉 ActionScript 3 编程模型)。它将承担动画循环和补间计算的繁重工作。因此,您无需使用第三方补间器、Timer、TimerTask 和 ScheduledExecutorService 循环。
希望这会对您有所帮助。
You can try flixel-android lib (especially if you are familiar with ActionScript 3 programming model). It will take the heavy lifting out of animation loops and tweens calculation. So you don't need to mess around with third-party tweeners, loops with
Timer
s,TimerTask
s andScheduledExecutorService
s.Hope this will help you.