public SharkTeethLineStyle(Color32 color, float baseValue, float height, float space) : base(color, 0)
 {
     Base   = GetBaseProperty(baseValue);
     Height = GetHeightProperty(height);
     Space  = GetSpaceProperty(space);
     Invert = GetInvertProperty(true);
 }
Example #2
0
        public Rule(Action onRuleChanged = null)
        {
            OnRuleChanged = onRuleChanged;

            SourceBuildings = new PropertyEnumValue <SourceBuildingTypes>("Source", RuleChanged, SourceBuildingTypes.All);
            TargetBuildings = new PropertyEnumValue <TargetBuildingTypes>("Target", RuleChanged, TargetBuildingTypes.All);
            UseSize         = new PropertyBoolValue("UseSize", RuleChanged, false);
            MaxLength       = new PropertyStructValue <int>("MaxLength", RuleChanged, 4);
            MaxWidth        = new PropertyStructValue <int>("MaxWidth", RuleChanged, 4);
        }
 public NetworkLineStyle(NetInfo prefab, float shift, float elevation, float scale, float offsetBefore, float offsetAfter, int repeatDistance, bool invert) : base(new Color32(), 0f)
 {
     Prefab         = new PropertyPrefabValue <NetInfo>("PRF", StyleChanged, prefab);
     Shift          = new PropertyStructValue <float>("SF", StyleChanged, shift);
     Elevation      = new PropertyStructValue <float>("E", StyleChanged, elevation);
     OffsetBefore   = new PropertyStructValue <float>("OB", StyleChanged, offsetBefore);
     OffsetAfter    = new PropertyStructValue <float>("OA", StyleChanged, offsetAfter);
     Scale          = new PropertyStructValue <float>("SC", StyleChanged, scale);
     RepeatDistance = new PropertyStructValue <int>("RD", StyleChanged, repeatDistance);
     Invert         = GetInvertProperty(invert);
 }
Example #4
0
        public MarkupRegularLine(Markup markup, MarkupPointPair pointPair, RegularLineStyle style = null, Alignment alignment = Alignment.Centre, bool update = true) : base(markup, pointPair, false)
        {
            RawAlignment = new PropertyEnumValue <Alignment>("A", AlignmentChanged, alignment);
            ClipSidewalk = new PropertyBoolValue("CS", ClipSidewalkChanged, DefaultClipSidewalk);

            if (update)
            {
                Update(true);
            }

            if (style != null)
            {
                AddRule(style, false, false);
                RecalculateStyleData();
            }
        }
Example #5
0
 public ChessBoardCrosswalkStyle(Color32 color, float offsetBefore, float offsetAfter, float squareSide, int lineCount, bool invert) : base(color, 0, offsetBefore, offsetAfter)
 {
     SquareSide = GetSquareSideProperty(squareSide);
     LineCount  = GetLineCountProperty(lineCount);
     Invert     = GetInvertProperty(invert);
 }
Example #6
0
 public ZebraCrosswalkStyle(Color32 color, float width, float offsetBefore, float offsetAfter, float dashLength, float spaceLength, bool parallel) : base(color, width, offsetBefore, offsetAfter)
 {
     DashLength  = GetDashLengthProperty(dashLength);
     SpaceLength = GetSpaceLengthProperty(spaceLength);
     Parallel    = GetParallelProperty(parallel);
 }