Esempio n. 1
0
        public void OnInputMove(Vector2 position)
        {
            if (!CGame.Instance.model.player.CanAction())
            {
                return;
            }
            if (!IsActiveIcon(selectedIcon))
            {
                return;
            }

            CIcon targetIcon = field.GetIconByPoint(position);

            if (selectedIcon != targetIcon && IsActiveIcon(targetIcon))
            {
                if (selectedIcon.IsNeighbour(targetIcon))
                {
                    if (StartSwipe(selectedIcon, targetIcon))
                    {
                        CGame.Input.Block();
                    }
                }

                selectedIcon = null;
            }
        }