Пример #1
0
        public void SwapGems(GemLogic gem1, GemLogic gem2)
        {
            Debug.Log("Swapping");
            var tmpPos = gem1.GetVectorPos();
            gem1.SetPos(gem2.X, gem2.Y);
            gem2.SetPos((int) tmpPos.x, (int) tmpPos.y);

            _lastMovedGem1 = gem1;
            _lastMovedGem2 = gem2;
            Invoke("CheckReverseTurn", Constants.GemTransitionTime/2);

            _gameManager.SetAnimationState(Constants.GemTransitionTime);
        }