GetChainBridges() private method

private GetChainBridges ( string strType, List chain, bool bubble ) : void
strType string
chain List
bubble bool
return void
Example #1
0
        public void Move()
        {
            UpdateEvent();

            if (touchMonitors.Count > 0)
            {
                int len = touchMonitors.Count;
                for (int i = 0; i < len; i++)
                {
                    EventDispatcher e = touchMonitors[i];
                    if (e != null)
                    {
                        if ((e is DisplayObject) && ((DisplayObject)e).stage == null)
                        {
                            continue;
                        }
                        if ((e is GObject) && !((GObject)e).onStage)
                        {
                            continue;
                        }
                        e.GetChainBridges("onTouchMove", sHelperChain, false);
                    }
                }

                Stage.inst.BubbleEvent("onTouchMove", evt, sHelperChain);
                sHelperChain.Clear();
            }
            else
            {
                Stage.inst.onTouchMove.Call(evt);
            }
        }
Example #2
0
        public void End()
        {
            began = false;

            UpdateEvent();

            if (touchMonitors.Count > 0)
            {
                int len = touchMonitors.Count;
                for (int i = 0; i < len; i++)
                {
                    EventDispatcher e = touchMonitors[i];
                    if (e != null)
                    {
                        e.GetChainBridges("onTouchEnd", sHelperChain, false);
                    }
                }
                target.BubbleEvent("onTouchEnd", evt, sHelperChain);

                touchMonitors.Clear();
                sHelperChain.Clear();
            }
            else
            {
                target.BubbleEvent("onTouchEnd", evt);
            }

            if (Timers.time - lastClickTime < 0.35f)
            {
                if (clickCount == 2)
                {
                    clickCount = 1;
                }
                else
                {
                    clickCount++;
                }
            }
            else
            {
                clickCount = 1;
            }
            lastClickTime = Timers.time;
        }