Cocos2d v.2到v.3:​​我的所有资源都像疯了一样扩大 [英] Cocos2d v.2 to v.3: All my resources scale up like crazy

查看:158
本文介绍了Cocos2d v.2到v.3:​​我的所有资源都像疯了一样扩大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用SpriteBuilder创建了一个新的cocos2d 3.3项目。我从我的cocos2d v2项目导入我的艺术资源和代码,并让它运行,但我的所有资源比原来的大小增加了约3倍,我设置的位置似乎是,所有的触摸处理似乎被打破。

I´ve just created an new cocos2d 3.3 project using SpriteBuilder. I imported my art resources and code from my cocos2d v2 project and got it to run, but all my resources scale up to about 3x their original size and the positions I set seems to be and all touch handling seems to be broken.

我只有一个sprite工作表,没有任何后缀(如-hd)。
我在AppDelegate.m中注释掉了 [CCBReader configureCCFileUtils];
,但没有改变任何内容。

I only have one sprite sheet and it does not have any suffix (like -hd). I´ve commented out [CCBReader configureCCFileUtils]; in AppDelegate.m but that didn´t change anything.

我必须添加一个后缀或将我的艺术放在一个特殊的文件夹中,使它像以前一样工作吗?我实际上没有使用SpriteBuilder,只是用它创建了项目。

Do I have to add a suffix or place my art in a special folder to make it work like before? I´m not actually using SpriteBuilder, just created the project with it.

推荐答案

当不使用SpriteBuilder时,您应该像以前一样注释掉AppDelegate.m中的[CCBReader configureCCFileUtils]。

When not using SpriteBuilder you should comment out [CCBReader configureCCFileUtils] in AppDelegate.m as you have done already.

以下后缀应该可以工作:

The following suffixes should work:


  • ipad / li>
  • -​​ ipadhd,retina iPad

  • -​​ hd,retina iPhone

  • -​​ iphone5hd ,iPhone 5 +

  • 无后缀,非视网膜iPhone(将在更高分辨率的设备上获得大小)

  • 用于iPhone 5+的资源,如果没有-iphone5hd

  • "-ipad", non-retina iPad
  • "-ipadhd", retina iPad
  • "-hd", retina iPhone
  • "-iphone5hd", iPhone 5+
  • no suffix, non-retina iPhone (will get upsized on higher resolution devices)
  • "-iphone5", non-retina assets used for iPhone 5+ if no "-iphone5hd"

由于您没有后缀,您可能最初用硬编码缩放因子来使用用于视网膜设备的资产。尝试将-hd添加到您的sprite表。

Since you don't have a suffix and it's looking upscaled, I suspect you may have originally hardcoded a scale factor to use assets meant for a retina device. Try adding -hd to your sprite sheet.

这篇关于Cocos2d v.2到v.3:​​我的所有资源都像疯了一样扩大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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