コード例 #1
0
ファイル: Animator.cs プロジェクト: svetlanatanasov/jusTap
        private Queue <Tuple <PositionInGame, PositionInGame> > GetPositionToMoveByLevel(uint level)
        {
            Queue <Tuple <PositionInGame, PositionInGame> > result = new Queue <Tuple <PositionInGame, PositionInGame> >();

            switch (level)
            {
            case 1:
                result.Enqueue(PositionInGameHelper.GetHorisontalSignalCouple());
                break;

            case 2:
                result.Enqueue(PositionInGameHelper.GetVerticalSignalCouple());
                break;

            case 3:
                result.Enqueue(PositionInGameHelper.GetDiagonalSignalCouple());
                break;

            case 4:
                result.Enqueue(PositionInGameHelper.GetHorisontalSignalCouple());
                result.Enqueue(PositionInGameHelper.GetHorisontalPlayCouple());
                break;

            case 5:
                result.Enqueue(PositionInGameHelper.GetVerticalSignalCouple());
                result.Enqueue(PositionInGameHelper.GetVerticalPlayCouple());
                break;

            case 6:
                result.Enqueue(PositionInGameHelper.GetDiagonalSignalCouple());
                result.Enqueue(PositionInGameHelper.GetDiagonalPlayCouple());
                break;

            case 7:
                result.Enqueue(PositionInGameHelper.GetRandomSignalCouple());
                result.Enqueue(PositionInGameHelper.GetRandomPlayCouple());
                break;

            case 8:
            default:
                var couples = PositionInGameHelper.GetAllRandom();
                foreach (var item in couples)
                {
                    result.Enqueue(item);
                }
                break;
                //case 10:
                //    foreach (var item in PositionInGameHelper.GetAllSignalsRandom())
                //        result.Enqueue(item);
                //    break;
            }

            return(result);
        }
コード例 #2
0
        private void BeginMoveRandomSignals(Action callback)
        {
            var signalCouple = PositionInGameHelper.GetRandomSignalCouple();

            animator.ChangeSquaresPosition(_timeForChangingPositions, signalCouple.Item1, signalCouple.Item2, callback);
        }