Ejemplo n.º 1
0
        public void Draw(IComponent component, SKCanvas canvas, float scale)
        {
            var allComponents = new List <IComponent>();

            component.AppendTo(allComponents);
            foreach (var c in allComponents)
            {
                var dc = c as IDrawerComponent;
                if (dc == null)
                {
                    continue;
                }

                dc.Draw(canvas, scale);
            }
        }
Ejemplo n.º 2
0
        public void Handle(IComponent component, long touchId, SKPoint touchLocation, TouchAction touchAction)
        {
            var allComponents = new List <IComponent>();

            component.AppendTo(allComponents);
            foreach (var c in allComponents)
            {
                var thc = c as ITouchHandlerComponent;
                if (thc == null)
                {
                    continue;
                }

                var hr = thc.Handle(touchId, touchLocation, touchAction);
                if (hr)
                {
                    break;
                }
            }
        }