The essence of the question is this, there is a button that performs actions, in which many if statements are written in succession and they are sequential, and the problem is that after clicking all if are processed, I need to stop at the first and wait for the next button press, so that everything happens in turn . If any way to stop the action of the button and wait for the next press?
@IBAction func varib1(_ sender: Any) { if sceneNumber == 1 { sceneNumber = 2 labelDisplayScene.text = "Вы выбили дверь несколькими ударами топора, но на вас напали разбойники, которые поджидали у двери" varib1Out.setTitle("Убежать", for: .normal) varib2Out.setTitle("Начать сражаться", for: .normal) varib3Out.setTitle("Попытаться договориться", for: .normal) } if sceneNumber == 2 { sceneNumber = 3 labelDisplayScene.text = "Вы смогли убежать но вас ранил разбойник стрелой" varib1Out.setTitle("Выпить зелье", for: .normal) varib2Out.setTitle("Вернуться и сразиться", for: .normal) varib3Out.setTitle("Следовать в деревню", for: .normal) }