Ejemplo n.º 1
0
        public Bar GetNextBar()
        {
            Bar nextBar = preparedBars.Dequeue();

            nextBar.Prepare(ProceduralPathGenerator.GetBarData(ScoreKeeper.Score));
            activeBars.Enqueue(nextBar);
            return(nextBar);
        }
Ejemplo n.º 2
0
        public void RecycleBars()
        {
            if (preparedBars.Count >= minimumNumberOfPreparedBars)
            {
                return;
            }

            float yPos = preparedBars.Last().transform.localPosition.y + 2;

            Bar bottomBar = activeBars.Dequeue();

            bottomBar.SetYPosition(yPos);
            bottomBar.Prepare(ProceduralPathGenerator.GetBarData(ScoreKeeper.Score));
            preparedBars.Enqueue(bottomBar);
        }
Ejemplo n.º 3
0
        private void OnBarPlaced()
        {
            float time = ProceduralPathGenerator.GetCurrentTimeScale(ScoreKeeper.Score);

            SetTime(time);
        }