the font file is called "herculanumRegular.ttf"
I put it in the code for a score counter, the font doesn't show but the score counter does.
i don't understand why
I've been following a series of videos called "Solo mission"
so i don't fully understand a lot
dumb it down for me
here's the code
var gameScore = 0
let scoreLabel = SKLabelNode(fontNamed: "herculanumRegular")
override func didMove(to view: SKView) {
scoreLabel.text = "Score: 0"
scoreLabel.fontSize = 70
scoreLabel.fontColor = SKColor.white
scoreLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentMode.left
scoreLabel.position = CGPoint(x: self.size.width0.20, y: self.size.height0.9)
scoreLabel.zPosition = 100
self.addChild(scoreLabel)
}
func addScore(){
gameScore += 1
scoreLabel.text = "Score: \(gameScore) "
}
3
0
434