Exemplo n.º 1
0
 void ToTile_Reset()
 {
     if (toTile != null && toTile != fromTile)
     {
         ColoredObject.End(toTile.gameObject);
         toTile = null;
     }
 }
Exemplo n.º 2
0
        void FromTile_UnSelectTile()
        {
            bool unSelect = false;

            switch (eventType)
            {
            case TouchUtility.EventType.Mouse:
                unSelect = Input.GetMouseButtonUp(0);
                break;

            case TouchUtility.EventType.Touch:
                unSelect = Input.touchCount == 0;
                break;
            }

            if (unSelect)
            {
                if (fromTile != null)
                {
                    ColoredObject.End(fromTile.gameObject);
                }

                if (fromTile != toTile)
                {
                    FromTile_Move();
                }

                if (ghostTileInstance != null)
                {
                    exceptionList.Remove(ghostTileInstance);
                    Destroy(ghostTileInstance.gameObject);
                    ghostTileInstance = null;
                }

                ToTile_Reset();
                exceptionList.Clear();
                toTile = fromTile = null;
            }
        }