//only to be constructed by using CreateFacetType() private FFacetType(string name, int index, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer) { this.index = index; this.name = name; this.initialAmount = initialAmount; this.expansionAmount = expansionAmount; this.maxEmptyAmount = maxEmptyAmount; this.createRenderLayer = createRenderLayer; }
private FFacetType(string name, int index, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer) //only to be constructed by using CreateFacetType() { this.index = index; this.name = name; this.initialAmount = initialAmount; this.expansionAmount = expansionAmount; this.maxEmptyAmount = maxEmptyAmount; this.createRenderLayer = createRenderLayer; }
//create your own FFacetTypes by creating them here public static FFacetType CreateFacetType(string facetTypeShortName, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer) { for(int s = 0; s<_facetTypes.Count; s++) { if(_facetTypes[s].name == facetTypeShortName) return _facetTypes[s]; //don't add it if we have it already } FFacetType newFacetType = new FFacetType(facetTypeShortName, _nextFacetTypeIndex++, initialAmount, expansionAmount, maxEmptyAmount, createRenderLayer); _facetTypes.Add (newFacetType); return newFacetType; }
//create your own FFacetTypes by creating them here public static FFacetType CreateFacetType(string facetTypeShortName, int initialAmount, int expansionAmount, int maxEmptyAmount, CreateRenderLayerDelegate createRenderLayer) { for (int s = 0; s < _facetTypes.Count; s++) { if (_facetTypes[s].name == facetTypeShortName) { return(_facetTypes[s]); //don't add it if we have it already } } FFacetType newFacetType = new FFacetType(facetTypeShortName, _nextFacetTypeIndex++, initialAmount, expansionAmount, maxEmptyAmount, createRenderLayer); _facetTypes.Add(newFacetType); return(newFacetType); }