public CoordinateParticleEffect CreateEffectAtCoord(string effectName, Vector3 pos, Vector3 rot = new Vector3(), float scale = 1f, InvertAxis invertAxis = 0, bool startNow = false) { CoordinateParticleEffect effect1 = new CoordinateParticleEffect(this, effectName, pos); effect1.Rotation = rot; effect1.Scale = scale; effect1.InvertAxis = invertAxis; CoordinateParticleEffect effect = effect1; if (startNow) { effect.Start(); } return(effect); }
/// <summary> /// Creates a <see cref="ParticleEffect"/> at a position that runs looped. /// </summary> /// <param name="effectName">The name of the effect.</param> /// <param name="pos">The World position where the effect is.</param> /// <param name="rot">What rotation to apply to the effect.</param> /// <param name="scale">How much to scale the size of the effect by.</param> /// <param name="invertAxis">Which axis to flip the effect in.</param> /// <param name="startNow">if <c>true</c> attempt to start this effect now; otherwise, the effect will start when <see cref="ParticleEffect.Start"/> is called.</param> /// <returns>The <see cref="CoordinateParticleEffect"/> represented by this that can be used to start/stop/modify this effect</returns> public CoordinateParticleEffect CreateEffectAtCoord(string effectName, Vector3 pos, Vector3 rot = default(Vector3), float scale = 1.0f, InvertAxis invertAxis = InvertAxis.None, bool startNow = false) { var result = new CoordinateParticleEffect(this, effectName, pos) { Rotation = rot, Scale = scale, InvertAxis = invertAxis }; if (startNow) { result.Start(); } return(result); }
public CoordinateParticleEffect CopyTo(Vector3 position) { CoordinateParticleEffect coordinateParticleEffect1 = new CoordinateParticleEffect(this._asset, this._effectName, position); coordinateParticleEffect1.Rotation = this._rotation; coordinateParticleEffect1.Color = this._color; coordinateParticleEffect1.Scale = this._scale; coordinateParticleEffect1.Range = this._range; coordinateParticleEffect1.InvertAxis = this._InvertAxis; CoordinateParticleEffect coordinateParticleEffect2 = coordinateParticleEffect1; if (this.IsActive) { coordinateParticleEffect2.Start(); } return(coordinateParticleEffect2); }
/// <summary> /// Creates a copy of this <see cref="CoordinateParticleEffect"/> to another position to simplify applying the same effect to many positions. /// </summary> /// <param name="position">The position to copy to.</param> /// <returns>A <see cref="CoordinateParticleEffect"/> that has all the same properties as this instance, but for a different position.</returns> public CoordinateParticleEffect CopyTo(Vector3 position) { var result = new CoordinateParticleEffect(_asset, _effectName, position) { Rotation = _rotation, Color = _color, Scale = _scale, Range = _range, InvertAxis = _InvertAxis }; if (IsActive) { result.Start(); } return(result); }
public CoordinateParticleEffect CopyTo(Vector3 position) { CoordinateParticleEffect effect1 = new CoordinateParticleEffect(base._asset, base._effectName, position); effect1.Rotation = base._rotation; effect1.Color = base._color; effect1.Scale = base._scale; effect1.Range = base._range; effect1.InvertAxis = base._InvertAxis; CoordinateParticleEffect effect = effect1; if (base.IsActive) { effect.Start(); } return(effect); }