如何在
Swift中使用CGPointMake?有相当的吗?我收到一个错误:
Use of unresolved identifier ‘CGPointMake’
基本上,我正在为Sprite Kit节点分配一个位置,并且无法弄清楚如何在Swift中执行此操作.
class PlayerSpaceship: Spaceship { func launchMissile() { var missile = Missile.playerMissile() // This line gives above mentioned error. missile.position = CGPointMake(0.0,0.0) } }
解决方法
使用CGPoint(x:Float,y:Float)