2011/05/17 (2) 리스트형 AVAudioPlayer로 배경 음악 재생하기 (싱글톤 사용) 작업할 파일은 다음과 같습니다. (1) AudioPlayer.h (2) AudioPlayer.m (3) GameLayer.m // // AudioPlayer.h // GameDemo // // Created by Chang-Min Pak on 6/12/10. // Copyright 2010 thefirstgoodcom. All rights reserved. // #import #import typedef enum { kAudio_Background } AudioPlayerType; @interface AudioPlayer : NSObject { AVAudioPlayer *backgroundAudioPlayer; } @property (nonatomic, retain) AVAudioPlayer *backg.. AudioToolbox를 이용하여 효과음 내기 (Singleton 사용) 작업 할 파일은 다음과 같습니다. (1) SoundManager.h (2) SoundManager.m (3) GameLayer.m // // SoundManager.h // GameDemo // // Created by Chang-Min Pak on 6/12/10. // Copyright 2010 thefirstgood.com. All rights reserved. // #import #import @interface SoundManager : NSObject { // 만들어진 SystemSoundID를 재사용하기 위해 보관할 dictionary NSMutableDictionary *soundIDDic; } @property (nonatomic, retain) NSMutableDictionary *sou.. 이전 1 다음