Пример #1
0
        private void OnTouchPadMove(EventContext context)
        {
            TouchPadModuleData data = (TouchPadModuleData)context.data;

            // Log.Warning(data.DeltaX + "****" + data.DeltaY);
            m_TouchPadXAxis.Update(data.DeltaX);
            m_TouchPadYAxis.Update(data.DeltaY);
        }
Пример #2
0
        public TouchPadModule(GComponent mainView)
        {
            OnMove = new EventListener(this, "onMove");
            OnEnd  = new EventListener(this, "onEnd");

            m_TouchPad = mainView.GetChild("touchPad");

            m_Data = new TouchPadModuleData();

            m_TouchPad.onTouchBegin.Add(this.OnTouchBegin);
            m_TouchPad.onTouchMove.Add(this.OnTouchMove);
            m_TouchPad.onTouchEnd.Add(this.OnTouchEnd);
        }