public EdgePrefabber(RandomPrefabPicker prefabPicker)
        {
            if (prefabPicker == null)
            {
                throw new ArgumentNullException("prefabs");
            }

            this.prefabPicker = prefabPicker;
        }
Ejemplo n.º 2
0
        public override IOutlinePrefabber GetOutlinePrefabber()
        {
            if (rockPrefabs == null)
            {
                throw new InvalidOperationException("Rock prefabs not set.");
            }

            if (rockPrefabs.Length == 0)
            {
                throw new InvalidOperationException("Must assign at least one rock prefab.");
            }

            var prefabPicker = new RandomPrefabPicker(rockPrefabs, seed);

            return(new EdgePrefabber(prefabPicker));
        }