Exemple #1
0
    private IEnumerator UpdateGame()
    {
        while (!HandleInput())
        {
            yield return(null);
        }

        GameController.StartGame();
        _currSegment = _map.Dequeue();
        _ballPos     = _currSegment.size / 2f;

        while (GameEvent.Current == GameStage.START)
        {
            HandleInput();
            UpdateBall();
            yield return(null);
        }
    }
Exemple #2
0
        private void TrimMap()
        {
            var segment = _segments.Dequeue();

            segment.Hide();
            _segmentsTransitionToPool.Add(segment);
            if (_segments.Count > 0)
            {
                var firstSegment = _segments.Peek();
                _firstSegmentPosWorld = GetFarCornerOfSegment(firstSegment);
            }
        }