summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Particles/Modifiers/Interpolators/Interpolator.cs
blob: 0ec98666ff2a29f3c988f1200f8807695ac2ab27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace MonoGame.Extended.Particles.Modifiers.Interpolators
{
    public abstract class Interpolator
    {
        protected Interpolator()
        {
            Name = GetType().Name;
        }

        public string Name { get; set; }
        public abstract unsafe void Update(float amount, Particle* particle);
    }

    public abstract class Interpolator<T> : Interpolator
    {
        /// <summary>
        /// Gets or sets the intial value when the particles are created.
        /// </summary>
        public virtual T StartValue { get; set; }

        /// <summary>
        /// Gets or sets the final value when the particles are retired.
        /// </summary>
        public virtual T EndValue { get; set; }
    }
}