Create a gist now

Instantly share code, notes, and snippets.

ccswift20150102
import Foundation
class MainScene: CCNode {
let audio:OALSimpleAudio = OALSimpleAudio.sharedInstance()
override func onEnter() {
self.userInteractionEnabled = true
super.onEnter()
}
override func touchBegan(touch: CCTouch!, withEvent event: CCTouchEvent!) {
println("touch!!")
self.audio.playEffect("click.mp3")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment