Exemple #1
0
        public void MouseDown()
        {
            _mouseDown.OverObject();

            Debug.Log("TouchController::StartTouch() startOver: " + _mouseDown.LastOverObject);
            ObjectCtrl controlObj = _mouseDown.StartClick();

            MessengerGlobal <GameObject> .Broadcast(EventsCtrl.TouchStart, _mouseDown.LastOverObject);

//			MessengerGlobal<List<GameObject>>.Broadcast(EventsCtrl.TouchStartAll, _mouseDown.LastOverObjects);
            MessengerGlobal <GameObject, GameObject> .Broadcast(EventsCtrl.TouchOverStart, null, _mouseDown.LastOverObject);

            if (controlObj != null)
            {
                controlObj.MouseDown();
            }
        }
Exemple #2
0
        public ObjectCtrl StartClick()
        {
            Debug.Assert(!IsDown, "Mouse::MouseDown::StartClick() already started", true);

            GameObject gameObj    = Picus.Ctrl.ManagerCtrl.Instance.MouseOverObject(out _lastOverObjects);
            ObjectCtrl controlObj = gameObj == null ? null : gameObj.GetComponent <ObjectCtrl>();

            StartTime   = Time.time;
            IsDown      = true;
            _isDragged  = false;
            _isDraggedY = false;
            StartPos    = Input.mousePosition;

            StartOverObject    = gameObj;
            LastOverObject     = StartOverObject;
            StartControlObject = controlObj;

            return(controlObj);
        }