The docs seem to suggest that running play on an SKAudioNode returns an SKAction
play() Creates an action that tells an audio node to start playback.
class func play() -> SKAction
So my wee logic tells me I can get at this returned Action, and assign it to a variable or constant like this:
var mySoundAction = mySoundNode.run(SKAction.play())
But Xcode tells me I'm an idiot and have no idea what I'm doing when I try to do this:
self.run(mySoundAction)
It tells me it's unable to convert a type of void to that of an SKAction.
What am I doing wrong? How deluded am I in my goals to have an action name for something like this?
returns an
SKAction, andruns that action on
mySoundNode. Therun()method returnsVoid("nothing"), so withyou run the "play" action on the node and assign
()tovar mySoundAction. What you perhaps meant is