如何在Android中添加OpenFeint的排行榜功能?
我正在 Android 中开发一个游戏,通过扩展一个带有视图的类。我通过研究 OpenFeint 站点 url 上提供的教程将 OpenFeint 集成到其中(http://support.openfeint.com/dev/getting-started-with-of-android-1-10-2-integrate-openfeint-in -your-game/),但我无法在我的应用程序中添加排行榜功能。我怎样才能做到这一点?
我的游戏类是这样的:
public class GameActivity extends Activity {
Intent i;
Grapic g;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(new Grapic(this));
,而 Grapic
是一个扩展视图的类,并且通过触摸事件完成评分。
I am developing a game in Android, by extending a class with view. I have integrated OpenFeint in it by studying the tutorial provided on OpenFeint site url is(http://support.openfeint.com/dev/getting-started-with-of-android-1-10-2-integrate-openfeint-in-your-game/), but I am not able to add a leaderboard feature in my app. How can I do that?
My game class is like this:
public class GameActivity extends Activity {
Intent i;
Grapic g;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(new Grapic(this));
and Grapic
is a class which extends view and where scoring is done with touch events.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己解决了问题
链接
http://support.openfeint.com/dev/getting-started-with-of-android-1-10-2-add-openfeint-features-to-your-game/
有代码
首先为您的游戏创建成就功能,然后创建排行榜,并参考下面您放置分数的代码
i solved problem by myself
The link
http://support.openfeint.com/dev/getting-started-with-of-android-1-10-2-add-openfeint-features-to-your-game/
had the code
and first create achievement feature for your game and then leader board in also and refer the code below where you put scores