摩托罗拉XOOM的cocos2d的Andr​​oid Texure问题 [英] Cocos2d android Texure issue on Motorola xoom

查看:246
本文介绍了摩托罗拉XOOM的cocos2d的Andr​​oid Texure问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发从GitHub(Weikuan周)在Android上的游戏的cocos2d框架,最新版本。

I am developing a game in android with Cocos2d framework with latest build from github(Weikuan Zhou).

在我的游戏,我用大量的图片(总图像大小约为11MB)。

In my game, I used lots of images(total images size is around 11MB).

问题: -
我越来越黑盒子,而不是图像时,我玩我的游戏的3倍以上。

Problem :- I am getting the black box instead of images when I play my game more than 3 times.

什么步骤将重现该问题?
1.当我通过我的游戏再玩一次的功能玩我的游戏的3倍以上。

What steps will reproduce the problem? 1. When I play my game more than 3 times via "Play Again" functionality of my game.

什么是预期的输出?你看到了什么呢?
- 图像应正确显示,而不是黑盒子

What is the expected output? What do you see instead? - images should be displayed properly instead of "BLACK BOX".

在我的logcat,我看到了堆内存善有善报13MB。

and in my logcat, I see the Heap memory goes around 13Mb.


  • 我已经通过以下方法释放纹理

CCTextureCache.sharedTextureCache()removeAllTextures();

CCTextureCache.sharedTextureCache().removeAllTextures();

我也试图删除精灵手动恩。 removeChild之()方法。

I also tried to remove sprite manually ex. removeChild() method.

但迄今没有成功找到任何解决方案。

But so far not succeeding to find any solution.

如果任何一个有解决方案,这个请让我知道。

If any one have solution for this please let me know.

推荐答案

当您在运行时加载资源发生此问题。因此,最好是现场starts.You可以做如下之前加载的资源。

This problem happens when you load resources at run time. So it is better to load resources before the scene starts.You can do as follows.


  1. 使用精灵表为您的游戏资源。

  2. 实施你的UI在你的类的构造函数。

  3. 在层实现覆盖的方法OnEnter的功能()。

  4. 您必须完成你的场景后卸载你的精灵表。

这就是我下面的步骤。
谢谢你。

These is the procedure that I am following. Thanks.

这篇关于摩托罗拉XOOM的cocos2d的Andr​​oid Texure问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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