獲得上述錯誤: 終止應用程序由於未捕獲的異常 'NSInvalidArgumentException',原因:「+ [CCProgressTimer progressWithSprite:]:無法識別的選擇發送到類0x1a8194[CCProgressTimer progressWithSprite:]:無法識別的選擇發送到類0x1a8194
這裏是我的代碼
arrow_base = [CCSprite spriteWithFile:ARROW_OUTER]; arrow_base.position = ccp(m_pBullet.position.x,m_pBullet.position.y);
arrow = [CCProgressTimer progressWithSprite:@"arrow_inner.png"];//[CCSprite spriteWithFile:ARROW_INNER]];
arrow.type=kCCProgressTimerTypeHorizontalBarLR;
//arrow.type = kCCProgressTimerTypeBar;
// arrow.midpoint = ccp(0,0.5);
arrow.position = ccp(m_pBullet.position.x,m_pBullet.position.y);
arrow.percentage = 100;
[m_pBulletCover addChild:arrow_base];
[m_pBulletCover addChild:arrow];
這cocos2d的版本?你檢查過該方法存在的api引用嗎? – LearnCocos2D 2013-03-21 12:37:05
THanks LearnCocos2d,我如何檢查它?順便說一句,我通過檢查它的庫文件並取代 arrow = [CCProgressTimer progressWithFile:@「arrow_inner.png」]; – iphonemaclover 2013-03-22 05:13:55
請在cocos2d.m或日誌中查看您運行應用的時間 – LearnCocos2D 2013-03-23 00:35:28