在 AndEngine 游戏中集成 Google Play 游戏服务排行榜的问题 [英] Issues in integrating Google Play Game Services Leaderboard in AndEngine Game

查看:48
本文介绍了在 AndEngine 游戏中集成 Google Play 游戏服务排行榜的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Google Play 游戏服务在排行榜中存储和显示用户的游戏分数.我正在关注这个 --> https://developers.google.com/games/services/android/init .当我在我的项目中导入 BaseGameUtils 库时出现问题,然后所有 andEngine 类都显示错误(例如,无法解析相机并且我的导入也显示错误).此外,还有两个 BaseGameActivity.java 类(一个在 andEngine jar 中,一个在 BaseGameUtils 库中).如何解决这个问题,请帮忙.

I'm trying to store and display the user's game score in a leaderboard using Google Play Game Services . I'm following this --> https://developers.google.com/games/services/android/init . The issue arises when I import the BaseGameUtils library in my project , then all the andEngine classes display an error (for eg. Camera cannot be resolved and my imports also display an error) . Also , there are two BaseGameActivity.java classes (one in the andEngine jar and one in the BaseGameUtils library ) . How to resolve this issue , please help .

推荐答案

我是通过以下方式解决的:1.将BaseGameActivity的名称(从BaseGameUtils lib)改为GoogleBaseGameActivity2. 扩展AndEngine BaseGameActivity3. 在我的主要游戏活动中,我扩展了 GoogleBaseGameActivty 而不是 Andengine .

I resolved it in following way: 1. Changed the name of BaseGameActivity (from BaseGameUtils lib) to GoogleBaseGameActivity 2. Made it to extend AndEngine BaseGameActivity 3. In my main game activty I extend GoogleBaseGameActivty instead of Andengine one.

面向对象编程的家伙:)

Object oriented programming guys:)

这篇关于在 AndEngine 游戏中集成 Google Play 游戏服务排行榜的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆