コード例 #1
0
        private void SetSpawnData()
        {
            for (var i = 0; i < _managedCount; i++)
            {
                _renderers[i].material.mainTexture = _powerupData.Image;
            }

            var spawnRotation = _deterministicRandomProvider.Next(_powerupData.SpawnRotation);

            MovementUtils.SetRotation(Transform, spawnRotation);
        }
コード例 #2
0
        private void ApplySpawnData()
        {
            for (var i = 0; i < _managedCount; i++)
            {
                _renderers[i].enabled = _obstacleData.IsEnabled(i);
                if (_renderers[i].enabled)
                {
                    _fatalCollisions.Add(i);
                }
            }

            _canSpin = _deterministicRandomProvider.NextBool(_levelData.RotationProbability);

            MovementUtils.SetRotation(Transform, GetNextSpawnRotation());
        }