1
打電話排行榜我得到了以下警告:如何從SKNode按鈕在MenuScene
不兼容的指針類型發送「MenuScene爲鍵入「的UIViewController」
的參數,我想打電話從遊戲中心排行榜點擊我的菜單場景中的這個按鈕。
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode: self];
SKNode *node = [self nodeAtPoint:location];
if ([node.name isEqualToString:@"playButton"]) {
SKTransition *transition = [SKTransition fadeWithDuration:0.5];
MyScene *gameScene = [[MyScene alloc]initWithSize:CGSizeMake(self.size.width, self.size.height)];
[self.scene.view presentScene:gameScene transition:transition];
} else if ([node.name isEqualToString:@"leaderboardButton"]) {
[[GameCenterHelper defaultHelper] showLeaderboardOnViewController:self];
}
在這最後的車道,我得到了警告
WOWS謝謝伊拉里奧!你是最棒的!!謝謝:) – Mehmet63
@ user3460981沒問題!你能接受我的回答嗎? ;-) – Ilario