private void OnDestroy() { BubblesPlayer.Instance.ChangeScoreEvent -= SetScore; BubblesPlayer.Instance.ChangeStarsEvent -= SetStars; ts.Break(); SimpleTween.Cancel(gameObject, false); SimpleTween.Cancel(starRightFull.gameObject, false); SimpleTween.Cancel(starLeftFull.gameObject, false); SimpleTween.Cancel(starMiddleFull.gameObject, false); }
private void OnDestroy() { if (MPlayer) { MPlayer.ChangeScoreEvent -= SetScore; } if (MPlayer) { MPlayer.ChangeStarsEvent -= SetStars; } if (ts != null) { ts.Break(); } SimpleTween.Cancel(gameObject, false); SimpleTween.Cancel(starRightFull, false); SimpleTween.Cancel(starLeftFull, false); SimpleTween.Cancel(starMiddleFull, false); }