Exemplo n.º 1
0
 public void OnEndDrag(BaseEventData data)
 {
     if (shadow != null)
     {
         shadow.OnEndDrag(data);
         shadow = null;
     }
 }
Exemplo n.º 2
0
        internal static int CompareByPosition(BuildCard left, BuildCard right)
        {
            float ly = left.Transform.position.z;
            float ry = right.Transform.position.z;

            if (Mathf.Abs(ly - ry) > 0.5 * 8.6f)
            {
                return(ly > ry ? -1 : 1);
            }
            return(left.Transform.position.x < right.Transform.position.x ? -1 : 1);
        }
Exemplo n.º 3
0
        public void OnBeginDrag(BaseEventData data)
        {
            if (data == null)
            {
                return;
            }
            PointerEventData pdata = data as PointerEventData;

            shadow = MainGame.Instance.DeckBuilder.CopyCard(this.data, pdata.position, true);
            if (shadow != null)
            {
                shadow.OnBeginDrag(data);
            }
        }