예제 #1
0
        void OnTouchesBegan(List <CCTouch> touches, CCEvent touchEvent)
        {
            touches = FindUniqueTouches(touches);

            if (touches.Count == 1)
            {
                var touch = touches[0];

                _lastKnownPoint = touch.Location;

                _trackedShape = null;
                _lineRecognizer.Clear();
            }
            else if (touches.Count > 1)
            {
                EvaluateResizeOrMoveStart(touches);
            }
        }
예제 #2
0
        void EvaluateResizeOrMoveStart(List <CCTouch> touches)
        {
            touches = FindUniqueTouches(touches);

            var touch = touches [0];

            _lastKnownPoint = touch.Location;
            if (_shapeNode.Children != null)
            {
                foreach (var obj in _shapeNode.Children)
                {
                    if (obj is ShapeNode)
                    {
                        if (obj.BoundingBox.ContainsPoint(_lastKnownPoint))
                        {
                            _trackedShape = obj as ShapeNode;
                        }
                    }
                }
            }
        }