开发者

Cocos2D: Play Sound on Touches Moved

开发者 https://www.devze.com 2023-03-20 14:42 出处:网络
I currently have a dial that rotates on touch.I would like to include a \"click\" sound effect when the dial is moving.I have the click sound working, but it is a bit chaotic.

I currently have a dial that rotates on touch. I would like to include a "click" sound effect when the dial is moving. I have the click sound working, but it is a bit chaotic.

I currently put this in my touches moved: [[SimpleAudioEngine sharedEngine] playEffect:@"ButtonClick.m4a"];

But when I rotate the dial the sound effects goes crazy (i.e. CLICKCLICKLICKCLICKCLICK...) when i would like to to do this: Click..Click..Click..Click..Click..

Instead of the "click" sound restarting at each movement of the dial, how can I achieve a "click" sound t开发者_JS百科hat finishes the full sound file and starts over each time (i.e. loop)?

0

精彩评论

暂无评论...
验证码 换一张
取 消