예제 #1
0
        public void OnPointerDown(PointerEventData eventData)
        {
            // Only mouse left button or touch plays sound
            if (eventData.pointerId < -1)
            {
                return;
            }

            viewManager.TryPlaySound(mouseDown);
        }
예제 #2
0
        public void Enter(Action onAnimationFinish, float withDelay = 0f)
        {
            delayOffset = withDelay;
            OnBeforeEnter();
            if (useGhost)
            {
                CaptureToGhost();
                OnEnter(() =>
                {
                    gameObject.SetActive(true);
                    viewManager.transitionGhost.gameObject.SetActive(false);
                    onAnimationFinish?.Invoke();
                });
            }
            else
            {
                gameObject.SetActive(true);
                OnEnter(onAnimationFinish);
            }

            viewManager.TryPlaySound(enterSound);
        }