以下代码的最后三行会生成警告
使用表达式初始化'CGVector'aka('struct CGVector') 不兼容的类型int
该警告意味着什么,我应该怎么做才能解决它?
-(void)update:(CFTimeInterval)currentTime
{
CGPoint playerPos = _player.position;
for(SKNode *enemyNode in _enemies) {
CGPoint enemyPos = enemyNode.position;
/* Uniform speed: */
CGVector diff = TCVectorMinus(playerPos, enemyPos);
CGVector normalized = TCVectorUnit(diff);
CGVector force = TCVectorMultiply(normalized, 4);