Alternative method for performSelector in SKAction in Swift

I'm converting a Sprikit App to Swift. But I have a problem to convert this method:

SKAction *releaseBalls = [SKAction sequence:@[[SKAction performSelector:@selector(createMyNode) onTarget:self],[SKAction waitForDuration:1]    ]];

Is there any alternative code in Swift ? Thanks

Answers


Try this out

class MyScene: SKScene {

    func doAction() {
        let releaseBalls = SKAction.sequence([
            SKAction.runBlock(self.createMyNode),
            SKAction.waitForDuration(1)
            ])
        // run action
    }

    func createMyNode() {
        // create the nodes
    }
}

Need Your Help

how to send notification on page change in dgrid using dojo/Javascript

javascript pagination dojo dgrid

I am using dgrid with pagination where I have to send notification to the user that on which page of dgrid he is currently looking at.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.