Exemplo n.º 1
0
        public override void TouchesBegan(NSSet touches, UIEvent evt)
        {
            var touch = (UITouch)touches.AnyObject;

            SKScene scene = OverlayScene;
            CGPoint p     = touch.LocationInView(this);

            p = scene.ConvertPointFromView(p);
            SKNode node = scene.GetNodeAtPoint(p);

            if (node.Name == "camera")
            {
                node.RunAction(SKAction.PlaySoundFileNamed(ResourceManager.GetResourcePath("click.caf"), false));
                ChangePointOfView();
                return;
            }

            NSSet allTouches = evt.AllTouches;

            TouchesCount = (int)allTouches.Count;
        }