/// <summary> /// Detects which machine buttons have been pressed and returns the index of the button pressed. /// </summary> /// <returns></returns> int caseTwo() { //Machine 1 (ball machine) button if (spawnObjectsRoot.ClickedButton() == 1) { return(1); } //Machine 2 (cube machine) button if (spawnObjectsRoot.ClickedButton() == 2) { return(2); } //Machine 3 (disabled machine) button if (spawnObjectsRoot.ClickedButton() == 3) { return(3); } else { return(0); } }