Example #1
0
        public void Show()
        {
            GameEvents.OnChildMenuOpened(this);

            if (_isOpen)
            {
                return;
            }

            _panel.DOKill();
            _isOpen = true;
            _raycastGroup.blocksRaycasts = false;
            _panel.localScale            = Vector3.zero;
            _panel.gameObject.SetActive(true);
            _points.text = GameManager.Instance.BestScore.ToString();

            _panel.DOScale(Vector3.one, GameManager.DURATION_1).SetEase(Ease.OutBounce).OnComplete(() => {
                _raycastGroup.blocksRaycasts = true;
            });
        }
 public override void Release()
 {
     clocking           = false;
     detectBalloonClick = false;
     positionBalloon    = false;
     if (leaveCoroutine != null)
     {
         GameManager.GetInstance().StopCoroutine(leaveCoroutine);
     }
     if (comeCoroutine != null)
     {
         GameManager.GetInstance().StopCoroutine(comeCoroutine);
     }
     if (balloonTrans != null)
     {
         balloonTrans.DOKill();
         balloonTrans.GetComponent <Collider>().enabled = false;
     }
 }