12345678910111213141516171819202122 |
- using UnityEngine;
- using System.Collections;
- using UnityEngine.UI;
- public class LifeCheckerButton : ButtonMenuTransitionEvent
- {
- private void Start()
- {
- GetComponent<Button>().onClick.AddListener(OnClick);
- }
- protected override void OnClick()
- {
- MenuManager._instance.ExitToMainMenu = false;
- if (LivesManager.Instance.CanPlay)
- {
- base.OnClick();
- } else
- {
- NotificationCenter.Post(NotificationType.TriedPlayingWithoutLivesLeft);
- }
- }
- }
|