私は現在様々な入力コントロールを試していますが、私が試したいSneakyInputを見つけました。SneakyInput/SneakyButton
+[CCTouchDispatcher addTargetedDelegate:priority:swallowsTouches:]: unrecognized selector sent to class 0xfed9c 2012-01-30 10:00:50.881 OpenSpace[588:1be03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[CCTouchDispatcher addTargetedDelegate:priority:swallowsTouches:]: unrecognized selector sent to class 0xfed9c'
私は数時間のために、このまわりで私の頭を叩いている:残念ながら、私は、層に次のエラーメッセージで全体アプリのクラッシュをSneakyButton(単にボタン)を追加していたときに
非常に喜んで解決策を求めてグーグルで試してみました。どんな援助も感謝します。なぜ、なぜそれは墜落しますか?
環境:Cocos2d 2.0ベータ版、OS X 10.7.2、iOSの5.0
コード:フル
-(void) addFireButton {
float buttonRadius = 80;
CGSize screenSize = [[CCDirector sharedDirector] winSize];
fireButton = [[[SneakyButton alloc] initWithRect:CGRectZero] autorelease];
fireButton.radius = buttonRadius;
fireButton.position = CGPointMake(screenSize.width - buttonRadius, buttonRadius);
[self addChild:fireButton];
}
エラーメッセージ:
SneakyInputはCocos2Dのv0.99のために書かれた2012-01-30 10:00:50.684 OpenSpace[588:1be03] cocos2d: cocos2d v2.0.0-beta2
2012-01-30 10:00:50.685 OpenSpace[588:1be03] cocos2d: Using Director Type:CCDirectorDisplayLink
[Switching to process 588 thread 0x1f113]
2012-01-30 10:00:50.763 OpenSpace[588:1be03] cocos2d: animation started with frame interval: 60.00
2012-01-30 10:00:50.766 OpenSpace[588:1be03] cocos2d: surface size: 960x640
2012-01-30 10:00:50.850 OpenSpace[588:1be03] init: <OpenSpace = 093BFAE0 | Tag = -1>
2012-01-30 10:00:50.857 OpenSpace[588:1be03] cocos2d: CCFileUtils: Warning file not found: spaceship-hd.png
2012-01-30 10:00:50.864 OpenSpace[588:1be03] +[CCTouchDispatcher addTargetedDelegate:priority:swallowsTouches:]: unrecognized selector sent to class 0xfed9c
2012-01-30 10:00:50.881 OpenSpace[588:1be03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[CCTouchDispatcher addTargetedDelegate:priority:swallowsTouches:]: unrecognized selector sent to class 0xfed9c'
*** First throw call stack:
(0x1c4c052 0x21e2d0a 0x1c4dadd 0x1bb2f00 0x1bb2ce2 0xb5438 0x1c4de1a 0x99e19 0x99dba 0x42890 0x345ed 0x1c4de1a 0x99e19 0x99dba 0x42890 0x26edd 0x90d7d 0x921c4 0x2a12db 0x2a11af 0x1c20966 0x1c20407 0x1b837c0 0x1b82db4 0x1b82ccb 0x29fd879 0x29fd93e 0x822a9b 0xb37d6 0x2525)
terminate called throwing an exception[Switching to process 588 thread 0x1be03]
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
直接そこに私の修正を追加しました:CCActionManager、CCScheduler、CCTouchDispathcer(iOS版)とCCEventDispatcher(Mac)はそれ以上のシングルトンではありません。代わりに、CCDirectorのプロパティです。 – clops