예제 #1
0
    public void MovimentDownAutomatic()
    {
        bool isPositionEmpty = CheckNewPositionDown();

        if (isPositionEmpty)
        {
            if (_period > _configuration.SpeedPills)
            {
                MovimentDown();
                _period = 0;
            }
            else
            {
                _period += Time.deltaTime;
            }
        }
        else if (!finishedMoviment)
        {
            if ((_nextItem1 == null || _nextItem1.FinalizedMoviment()) && (_nextItem2 == null || _nextItem2.FinalizedMoviment()))
            {
                FinalizeMoviment();
            }
        }
    }