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); } }
private void TrimMap() { var segment = _segments.Dequeue(); segment.Hide(); _segmentsTransitionToPool.Add(segment); if (_segments.Count > 0) { var firstSegment = _segments.Peek(); _firstSegmentPosWorld = GetFarCornerOfSegment(firstSegment); } }