void OnDestroy() { NGUIHelper.RemoveClickEventListener(playButton, OnButtonPlay); NGUIHelper.RemoveClickEventListener(demoButton, OnButtonDemo); EventManager.Highlight -= OnHighlightOn; EventManager.NoHighlight -= OnHighlightOff; EventManager.TutorialCompleted -= OnTutorialCompleted; }
void OnDestroy() { NGUIHelper.RemoveClickEventListener(windButton, OnButtonClick); NGUIHelper.RemoveClickEventListener(stringButton, OnButtonClick); NGUIHelper.RemoveClickEventListener(brassButton, OnButtonClick); NGUIHelper.RemoveClickEventListener(percussionButton, OnButtonClick); EventManager.Highlight -= OnHighlightOn; EventManager.NoHighlight -= OnHighlightOff; }
void OnDestroy() { EventManager.MenuHide -= MenuHide; NGUIHelper.RemoveClickEventListener(menuButton, OnButtonPressMenu); NGUIHelper.RemovePressEventListener(facebookButton, OnFacebookPress); NGUIHelper.RemovePressEventListener(twitterButton, OnTwitterPress); NGUIHelper.RemovePressEventListener(reviewButton, OnReviewPress); if (underlay != null) { NGUIHelper.RemoveClickEventListener(underlay.gameObject, HideMenu); } }