Skip to content

Instantly share code, notes, and snippets.

@Seasons7
Created January 2, 2015 14:37
Show Gist options
  • Save Seasons7/4e2df96f5433ef7bbd82 to your computer and use it in GitHub Desktop.
Save Seasons7/4e2df96f5433ef7bbd82 to your computer and use it in GitHub Desktop.
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