Ejemplo n.º 1
0
        public void OnPointerClick(PointerEventData data)
        {
            Transform child = tray.transform.GetChild(index);

            Assert.Invariant(child != null, "Piece tray has no child of index " + index);
            Rotater r = child.GetComponent <Rotater>();

            Assert.Invariant(r != null, "Piece tray's child " + index + " has no rotater!");
            r.OnPointerClick(data);
        }
Ejemplo n.º 2
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            Transform child = tray.transform.GetChild(index);

            Assert.Invariant(child != null, "Piece tray has no child of index " + index);
            dragger = child.GetComponent <Dragger>();
            Assert.Invariant(dragger != null, "Piece tray's child " + index + " has no dragger!");
            rotater = child.GetComponent <Rotater>();
            Assert.Invariant(rotater != null, "Piece tray's child " + index + " has no rotater!");
            dragger.OnBeginDrag(eventData);
            rotater.OnBeginDrag(eventData);
        }