My goal is to disable input before the sprite has completed moving and rotating to 0 degrees and then re-enable it after these actions finish animating. I am using the code:
buck.stopAllActions();
buck.runAction (cc.moveTo( moveTime , event.getLocation() ));
buck.runAction(cc.sequence(
cc.callFunc(theMouse.setEnabled(false)),
cc.callFunc(cc.log(theMouse.isEnabled())),
cc.rotateTo( rotateTime, at ),
cc.delayTime(moveTime),
cc.rotateTo(pivotTime, 0),
cc.callFunc(theMouse.setEnabled(true)),
cc.callFunc(cc.log(theMouse.isEnabled()))
));
When I click the screen my console instantly says false, true which means the first and last actions in the sequence are being run before my cc.rotateTo action has even run. Right? How can I fix this? If there is a better way to implement this behavior I would love to know that as well. Thanks guys.