void Update() { if (active) //If no sub-window is open { Debug.Log("take action"); action = menu.getActions(); if (action != pauseMenuOptions.None) { active = false; takeAction(action); } } else { //If opened menu for equipo or bolsa submit button will exit if ((action == pauseMenuOptions.Bolsa || action == pauseMenuOptions.Equipo)) { if (Input.GetButtonDown("Submit")) { deactivateSubWindow(action); active = true; } } } moneyText.text = GameData.saveData.money.ToString(); coredexText.text = "10/30"; }