Beispiel #1
0
 // Clone constructor
 public LBGroupZone(LBGroupZone lbGroupZone)
 {
     if (lbGroupZone == null)
     {
         SetClassDefaults();
     }
     else
     {
         zoneType       = lbGroupZone.zoneType;
         zoneMode       = lbGroupZone.zoneMode;
         zoneName       = lbGroupZone.zoneName;
         GUID           = lbGroupZone.GUID;
         centrePointX   = lbGroupZone.centrePointX;
         centrePointZ   = lbGroupZone.centrePointZ;
         width          = lbGroupZone.width;
         length         = lbGroupZone.length;
         isScaledPointX = lbGroupZone.isScaledPointX;
         isScaledPointZ = lbGroupZone.isScaledPointZ;
         isScaledWidth  = lbGroupZone.isScaledWidth;
         isScaledLength = lbGroupZone.isScaledLength;
         showInScene    = lbGroupZone.showInScene;
         showInEditor   = lbGroupZone.showInEditor;
         useBiome       = lbGroupZone.useBiome;
         lbBiome        = lbGroupZone.lbBiome;
     }
 }
 // Clone constructor
 public LBBiome(LBBiome lbBiome)
 {
     if (lbBiome == null)
     {
         SetClassDefaults();
     }
     else
     {
         biomeIndex   = lbBiome.biomeIndex;
         minBlendDist = lbBiome.minBlendDist;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Constructor to create a clone of a LBFilter instance
 /// </summary>
 /// <param name="lbFilter"></param>
 public LBFilter(LBFilter lbFilter)
 {
     this.filterType          = lbFilter.filterType;
     this.filterMode          = lbFilter.filterMode;
     this.areaRect            = lbFilter.areaRect;
     this.showAreaHighlighter = lbFilter.showAreaHighlighter;
     this.minProximity        = lbFilter.minProximity;
     this.layerMask           = lbFilter.layerMask;
     this.filterByTag         = lbFilter.filterByTag;
     this.terrainTexture      = new LBTerrainTexture(lbFilter.terrainTexture);
     this.lbStencilGUID       = lbFilter.lbStencilGUID;
     this.lbStencilLayerGUID  = lbFilter.lbStencilLayerGUID;
     this.lbBiome             = lbFilter.lbBiome;
     this.cutOff = lbFilter.cutOff;
 }
Beispiel #4
0
 // Class constructors
 public LBFilter()
 {
     // defaults
     this.filterType         = FilterType.Area;
     this.filterMode         = FilterMode.AND;
     this.areaRect           = new Rect(0f, 0f, 1000f, 1000f);
     showAreaHighlighter     = false;
     minProximity            = 10f;
     layerMask               = 0;
     filterByTag             = LBFilter.FilterByAllTags;
     this.lbStencilGUID      = string.Empty;
     this.lbStencilLayerGUID = string.Empty;
     lbBiome = null;
     cutOff  = 0.5f; // All pre-2.3.2 filters will be 0.5. AND/OR/NOT - can only be 1 default value.
 }
Beispiel #5
0
        public LBFilter(FilterType filterType, FilterMode filterMode)
        {
            this.filterType = filterType;
            this.filterMode = filterMode;

            // defaults
            this.areaRect           = new Rect(0f, 0f, 1000f, 1000f);
            showAreaHighlighter     = false;
            minProximity            = 10f;
            layerMask               = 0;
            filterByTag             = LBFilter.FilterByAllTags;
            this.lbStencilGUID      = string.Empty;
            this.lbStencilLayerGUID = string.Empty;
            lbBiome = null;
            cutOff  = this.filterMode == FilterMode.NOT ? 0.1f : 0.5f;
        }
Beispiel #6
0
        private void SetClassDefaults()
        {
            zoneType = LBGroupZoneType.circle;
            zoneMode = ZoneMode.OR;
            zoneName = "new group zone";
            // Assign a unique identifier
            GUID = System.Guid.NewGuid().ToString();

            centrePointX   = 0f;
            centrePointZ   = 0f;
            width          = 10f;
            length         = 10f;
            isScaledPointX = true;
            isScaledPointZ = true;
            isScaledWidth  = true;
            isScaledLength = true;
            showInScene    = true;
            showInEditor   = true;
            useBiome       = false;
            // This probably has little or no effect as it will always create
            // a default LBBiome as serializer cannot store nulls.
            lbBiome = null;
        }