When ever my game pauses, the text hides. I have no clue why but I can't figure it out. Here is my code:
self.isPaused == true
if let label = self.label1 {
label.alpha = 0.0
label.run(SKAction.fadeIn(withDuration: 0.0))
self.label = self.childNode(withName: "//Game Over") as? SKLabelNode
if let label = self.label {
label.alpha = 0.0
label.run(SKAction.fadeIn(withDuration: 0.0))
if(_hide == true){
label.text = "hello"
} else {
label.text = "Game Over!!"
label.isHidden = false
}
}
}
My text is disappearing if I pause the scene but if I don't pause, it won't hide it.