问题
Hello all I want to do is create a SKAction which does something similar to wheelRight.physicsBody.velocity = CGVectorMake(0, 1000);
to a physics object.
回答1:
Use SKAction runBlock: method:
SKAction *changeVelocity = [SKAction runBlock:^{
wheelRight.physicsBody.velocity = CGVectorMake(0, 1000);
}];
SKAction sequence = [SKAction sequence:@[..., changeVelocity, ..., ...]];
[wheelRight runAction:sequence];
来源:https://stackoverflow.com/questions/21400928/how-to-create-custom-skactions