public FireworkEffect(bool flicker, bool trail, List <Color> colors, List <Color> fadeColors, FireworkEffectType type) { if (!colors.Any()) { throw new Exception("Cannot make FireworkEffect without any color"); } this.flicker = flicker; this.trail = trail; this.colors = colors; this.fadeColors = fadeColors; this.type = type; }
public Builder With(FireworkEffectType type) { Debug.Assert(type != default(FireworkEffectType), "Cannot have null type"); this.type = type; return(this); }