0
我有一個球開始衝動,但我希望它在等待3秒鐘之後才能開始。我把這個代碼想到了,但它不起作用。等待操作不起作用
//add sprite to scene
[self addChild:ball];
SKAction *wait = [SKAction waitForDuration:3];
[self runAction:wait];
//create vector
CGVector myVector = CGVectorMake(10, 25);
//apply vector to ballphysics body
[ball.physicsBody applyImpulse:myVector];