Sunday, 15 September 2013

ios - cannot invoke 'runaction' with an argument of type 'skaction' when trying to play sound -


I am developing a game faster and when the user performs some tricks then want to play different voices. When sound should be played, then GameViewController is set in, but I can not play sound from there. So I tried to use this technology to call the GameVcController GameScene function:

VimeController:

  GameScene.wordsFoundSound ()  

In game sedan:

  // globaly (outside: class GameScene: SKScene {...}) meet sound = SKAction.playSoundFileNamed ("Chomp.wav", waitForCompletion : False) // inside class gamensin: sccine {...} square fx wordfound sound () {runAction (foundSound)}  

But I get this error: the reasoning of type 'sketch' With 'runout'

I can not understand it Please ... please help me and thank you!

No problem, I was so focused on my first thought that I forgot to find other solutions Gone ... I did not know that you can pay sound with AVFoundation. Sorry for the question

I got the answer from here:


No comments:

Post a Comment