所以我在cocos2d(v2.1)中制作游戏,我决定在实际设备上测试它(它在模拟器中工作正常),所以当我把它放在设备上时,它崩溃了启动画面。当我在模拟器中运行它时,调试窗格只显示一个错误:
cocos2d: WARNING Filename(font_white-hd) already has the suffix -hd. Using it.
所以我的问题是,这可能是导致崩溃的原因吗?如果有的话,任何关于如何修复它的想法都将非常感激。
欢呼声。
更新
这是它在日志中说的所有内容:
cocos2d: cocos2d-iphone v2.1-rc1
cocos2d: compiled with Profiling Support: NO
cocos2d: OS version: 6.1 (0x06010000)
cocos2d: GL_VENDOR: Apple Computer, Inc.
cocos2d: GL_RENDERER: Apple Software Renderer
cocos2d: GL_VERSION: OpenGL ES 2.0 APPLE
cocos2d: GL_MAX_TEXTURE_SIZE: 4096
cocos2d: GL_MAX_TEXTURE_UNITS: 8
cocos2d: GL_MAX_SAMPLES: 4
cocos2d: GL supports PVRTC: YES
cocos2d: GL supports BGRA8888 textures: YES
cocos2d: GL supports NPOT textures: YES
cocos2d: GL supports discard_framebuffer: YES
cocos2d: GL supports shareable VAO: NO
2014-05-09 23:04:00.602 TowerDefenseUpdate[687:c07] cocos2d: animation started with
frame interval: 60.00
2014-05-09 23:04:00.606 TowerDefenseUpdate[687:c07] cocos2d: surface size: 1136x640
2014-05-09 23:04:00.819 TowerDefenseUpdate[687:c07] -[CCFileUtils
getPathForFilename:withSuffix:] : cocos2d: WARNING Filename(font_white-hd) already has
the suffix -hd. Using it.
和相应的代码:
// 8 - gold
playerGold = 1000;
ui_gold_lbl = [CCLabelBMFont labelWithString:[NSString stringWithFormat:@"GOLD:
%d",playerGold] fntFile:@"font_white-hd.fnt"];
[self addChild:ui_gold_lbl z:10];
[ui_gold_lbl setPosition:ccp(5,winSize.height-65)];
[ui_gold_lbl setAnchorPoint:ccp(0,0.5)];