我正在使用Swift在Xcode(版本7.0 Beta)中创建游戏,并希望在游戏结束时以“gameOver.ttf”字体显示标签“Game Over”。我已将字体添加到我的资源文件夹中,但不知道如何在代码中引用它。能请教一下吗? 我的代码:
let label = SKLabelNode(fontNamed: "gameOver")
label.text = "Game Over"
label.fontColor = SKColor.redColor()
label.fontSize = 150
label.position = CGPointMake(0, 100)
label.horizontalAlignmentMode = .Center
node.addChild(label)