Hello my friends,
i need a button that execute my func. I created the button but how can i say him when i click it, it has to start a func?
This is my code for the button:
__________________________
func sayHello(){
print("Hello")
}
button.position = CGPoint(x: frame.midX, y: frame.maxY/3)
button.name = "HelloButton"
button.size = CGSize(width: button.size.width * 0.1, height: button.size.height * 0.1)
button.isHidden = false
addChild(button)
___________________________
Or can I somehow connect the Main.Storyboard to the GameScene? Every time I try that, the connection deletes itself.
thanks for your help :-)