Beispiel #1
0
        public ObstacleData GetNextObstacleData()
        {
            _groupCount--;
            if (_groupCount <= 0 || _obstacleId < 0)
            {
                _obstacleId      = _shuffleBag.Next();
                _groupColorIndex = _deterministicRandomProvider.Next(0, GameConstants.Animation.Obstacle.DefaultColors.Count);

                _groupCount = _deterministicRandomProvider.Next(_groupRange);
                _groupCount--;
            }

            return(_data[_obstacleId]);
        }
 public IBasePowerupData GetNextPowerupData()
 {
     _powerupId = _shuffleBag.Next();
     return(_powerupId >= _data.Length || _powerupId < 0 ? null : _data[_powerupId]);
 }