cocos2d-x的音效分爲背景音樂和配音。
背景音樂的語句是:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("dida.wav")
配音是在需要配音的地方加上以下代碼:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("yanhua.wav");
括號內是自己加的聲音文件的命名。
cocos2d-x的音效分爲背景音樂和配音。
背景音樂的語句是:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("dida.wav")
配音是在需要配音的地方加上以下代碼:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("yanhua.wav");
括號內是自己加的聲音文件的命名。
struct transformValues_ 擁有如下幾個參數 CCPoint pos; // position x and y 位置 CCPoint scale; // scale x and y