swiftcocos2d-iphonecocos2d-swift

CCActionCallBlock usage in Cocos2d Swift


I used below cocos2d-swift code, giving 1 error. See below image.

var calBck  = CCActionCallBlock.actionWithBlock({
                self.showGlassEffect()
        }) as CCActionCallBlock
var seq = CCActionSequence.actions(move, delay, calBck, nil) as CCActionSequence

enter image description here

How to use CCActionCallBlock in Cocos2d Swift ?


Solution

  • You need to use:

    var seq = CCActionSequence.actionWithArray(arr) as CCActionSequence