public ParticleEmitter(string name, TextureRegion2D textureRegion, int capacity, TimeSpan lifeSpan, Profile profile) { _lifeSpanSeconds = (float)lifeSpan.TotalSeconds; Name = name; TextureRegion = textureRegion; Buffer = new ParticleBuffer(capacity); Offset = Vector2.Zero; Profile = profile ?? throw new ArgumentNullException(nameof(profile)); Modifiers = new List <ParticleModifier>(); ModifierExecutionStrategy = ParticleModifierExecutionStrategy.Serial; Parameters = new ParticleReleaseParameters(); }
public ParticleEmitter(int capacity, TimeSpan term, Profile profile) { if (profile == null) throw new ArgumentNullException(nameof(profile)); _term = (float)term.TotalSeconds; Buffer = new ParticleBuffer(capacity); Offset = new Vector2(); Profile = profile; Modifiers = new IModifier[0]; ModifierExecutionStrategy = ParticleModifierExecutionStrategy.Serial; Parameters = new ParticleReleaseParameters(); }
public ParticleEmitter(int capacity, TimeSpan term, Profile profile) { if (profile == null) { throw new ArgumentNullException(nameof(profile)); } _term = (float)term.TotalSeconds; Buffer = new ParticleBuffer(capacity); Offset = new Vector2(); Profile = profile; Modifiers = new IModifier[0]; ModifierExecutionStrategy = ParticleModifierExecutionStrategy.Serial; Parameters = new ParticleReleaseParameters(); }
public ParticleEmitter(TextureRegion2D textureRegion, int capacity, TimeSpan term, Profile profile, bool autoTrigger = true) { if (profile == null) { throw new ArgumentNullException(nameof(profile)); } _term = (float)term.TotalSeconds; _autoTrigger = autoTrigger; TextureRegion = textureRegion; Buffer = new ParticleBuffer(capacity); Offset = Vector2.Zero; Profile = profile; Modifiers = new IModifier[0]; ModifierExecutionStrategy = ParticleModifierExecutionStrategy.Serial; Parameters = new ParticleReleaseParameters(); }