-(void)movePipes
{
[_gameLayer enumerateChildNodesWithName:@"pole" usingBlock:^(SKNode *node, BOOL *stop) {
SKSpriteNode *poleSprite = (SKSpriteNode *) node;
if (poleSprite.position.x < -50) {
[poleSprite removeFromParent];
}
else
{
CGPoint distanceToMove = CGPointMake(-PIPE_POINTS_PER_SEC, 0);
CGPoint amtToMove = CGPointMultiplyScalar(distanceToMove, _dt);
poleSprite.position = CGPointAdd(amtToMove, poleSprite.position);
}
}];
}
这会引发以下错误:
Passing 'NSTimeInterval' (aka double) to parameter of incompatible type'CGFloat' aka 'float'