【发布时间】:2015-08-30 12:21:50
【问题描述】:
我需要别人的帮助。实际上我不知道要替换什么来获得自定义背景图像。实在不行了。
-(id) init
{
// always call "super" init
// Apple recommends to re-assign "self" with the "super's" return value
if( (self=[super initWithColor:ccc4(219,31,94, 999)]) ) {
ws=[[CCDirector sharedDirector]winSize];
NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"game" ofType:@"wav"];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:nil];
player.numberOfLoops=-1;
[player play];
【问题讨论】:
标签: ios iphone xcode xcode6 ios-simulator