示例#1
0
        public void Initialize()
        {
            _timer = new Timer(0.5f, 1);

            TooltipShowHandler = new MulticastDelegate(this, TOOLTIP_SHOW);
            TooltipHideHandler = new MulticastDelegate(this, TOOLTIP_HIDE);

            /**
             * Sanity check
             * */
            //if (FadeInDuration + FadeOutDuration > MessageLifeTime)
            //    throw new TooltipManagerException(TooltipManagerException.LifetimeError);

            InitStage();

            MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_OVER, MouseOverHandler);
            if (ContinuousMode)
            {
                MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_MOVE, MouseMoveHandler);
            }
            MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_OUT, MouseOutHandler);

#if TRIAL
            /* HACK CHECK */
            Acme acme = (Acme)Framework.GetComponent <Acme>(true);
            if (null == acme || !acme.gameObject.activeInHierarchy /*active*/ || !acme.enabled)
            {
                return;
            }
#endif
        }
示例#2
0
        public void Initialize()
        {
            _timer = new Timer(0.5f, 1);

            TooltipShowHandler = new MulticastDelegate(this, TOOLTIP_SHOW);
            TooltipHideHandler = new MulticastDelegate(this, TOOLTIP_HIDE);

            /**
             * Sanity check
             * */
            //if (FadeInDuration + FadeOutDuration > MessageLifeTime)
            //    throw new TooltipManagerException(TooltipManagerException.LifetimeError);

            InitStage();

            MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_OVER, MouseOverHandler);
            if (ContinuousMode)
                MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_MOVE, MouseMoveHandler);
            MouseEventDispatcher.Instance.AddEventListener(MouseEvent.MOUSE_OUT, MouseOutHandler);

#if TRIAL
            /* HACK CHECK */
            Acme acme = (Acme) Framework.GetComponent<Acme>(true);
            if (null == acme || !acme.gameObject.activeInHierarchy/*active*/ || !acme.enabled)
                return;
#endif
        }