public InterpolatorColor(System.Collections.SortedList colorKeyFrames)
        {
            //_colors = a_colorKeyFrames;
            _interpolators = new List<Interpolator>();

            for (int i = 0; i < 4; i++)
            {
                Interpolator ip = new Interpolator();
                _interpolators.Add(ip);
                System.Collections.SortedList a = new System.Collections.SortedList();
                for (int nClrNum = 0; nClrNum < colorKeyFrames.Count; nClrNum++)
                {
                    Color clr = (Color)colorKeyFrames.GetByIndex(nClrNum);
                    double dVal = 0;
                    if (i == 0)
                        dVal = clr.A;
                    else if (i == 1)
                        dVal = clr.R;
                    else if (i == 2)
                        dVal = clr.G;
                    else if (i == 3)
                        dVal = clr.B;
                    a.Add(colorKeyFrames.GetKey(nClrNum), dVal);
                }
                ip.KeyFramesList = a;
            }
        }
Beispiel #2
0
        public InterpolatorColor(System.Collections.SortedList colorKeyFrames)
        {
            //_colors = a_colorKeyFrames;
            _interpolators = new List <Interpolator>();

            for (int i = 0; i < 4; i++)
            {
                Interpolator ip = new Interpolator();
                _interpolators.Add(ip);
                System.Collections.SortedList a = new System.Collections.SortedList();
                for (int nClrNum = 0; nClrNum < colorKeyFrames.Count; nClrNum++)
                {
                    Color  clr  = (Color)colorKeyFrames.GetByIndex(nClrNum);
                    double dVal = 0;
                    if (i == 0)
                    {
                        dVal = clr.A;
                    }
                    else if (i == 1)
                    {
                        dVal = clr.R;
                    }
                    else if (i == 2)
                    {
                        dVal = clr.G;
                    }
                    else if (i == 3)
                    {
                        dVal = clr.B;
                    }
                    a.Add(colorKeyFrames.GetKey(nClrNum), dVal);
                }
                ip.KeyFramesList = a;
            }
        }
Beispiel #3
0
 private void Clear()
 {
     this.Dispose();
     _interpolators = new List <Interpolator>();
     for (int i = 0; i < 4; i++)
     {
         Interpolator pol = new Interpolator();
         pol.Max = 255;
         _interpolators.Add(pol);
     }
 }
        public ParticleEmitter()
        {
            m_bMeInvisibleButNotChildren = true;
            Name         = "ParticleEmitter";
            m_endogine   = EndogineHub.Instance;
            particlelist = new ArrayList();
            this.Ink     = RasterOps.ROPs.AddPin;

            SortedList aColors = new SortedList();

            aColors.Add(0.0, Color.FromArgb(255, 255, 255));
            aColors.Add(1.0, Color.FromArgb(0, 0, 0));
            m_interpolator = new InterpolatorColor(aColors);

            SortedList aSize = new SortedList();

            aSize.Add(0.0, 1.0);
            aSize.Add(1.0, 0.0);
            m_interpolatorSize = new Interpolator();
            m_interpolatorSize.KeyFramesList = aSize;

            m_particleSizeFact      = 1;
            m_particleSizeFactRange = 0.5f;

            chaos = 0f;

            m_fNewParticlesPerFrame = 1;
            m_nMaxNumParticles      = 200;

            rotationrange = 90f;

            m_pntAddedVelocity = new EPointF();

            life            = 50;
            liferange       = 20;
            sprayangle      = 0f;
            sprayanglerange = 0.0f;
            speed           = 3f;
            speedrange      = 0.5f;
            gravity         = 0.3f;
            gravityangle    = 0f;
            wind            = 0f;
            windangle       = 0f;
        }
        public ParticleEmitter()
        {
            m_bMeInvisibleButNotChildren = true;
            Name = "ParticleEmitter";
            m_endogine = EndogineHub.Instance;
            particlelist=new ArrayList();
            this.Ink = RasterOps.ROPs.AddPin;

            SortedList aColors = new SortedList();
            aColors.Add(0.0, Color.FromArgb(255,255,255));
            aColors.Add(1.0, Color.FromArgb(0,0,0));
            m_interpolator = new InterpolatorColor(aColors);

            SortedList aSize = new SortedList();
            aSize.Add(0.0, 1.0);
            aSize.Add(1.0, 0.0);
            m_interpolatorSize = new Interpolator();
            m_interpolatorSize.KeyFramesList = aSize;

            m_particleSizeFact = 1;
            m_particleSizeFactRange = 0.5f;

            chaos=0f;

            m_fNewParticlesPerFrame = 1;
            m_nMaxNumParticles = 200;

            rotationrange=90f;

            m_pntAddedVelocity = new EPointF();

            life = 50;
            liferange = 20;
            sprayangle = 0f;
            sprayanglerange = 0.0f;
            speed = 3f;
            speedrange = 0.5f;
            gravity = 0.3f;
            gravityangle = 0f;
            wind = 0f;
            windangle = 0f;
        }
 private void Clear()
 {
     this.Dispose();
     _interpolators = new List<Interpolator>();
     for (int i = 0; i < 4; i++)
     {
         Interpolator pol = new Interpolator();
         pol.Max = 255;
         _interpolators.Add(pol);
     }
 }
 public void SetSizeList(SortedList a_aSizesToInterpolate)
 {
     m_interpolatorSize = new Interpolator();
     m_interpolatorSize.KeyFramesList = a_aSizesToInterpolate;
 }
 public void SetSizeList(SortedList a_aSizesToInterpolate)
 {
     m_interpolatorSize = new Interpolator();
     m_interpolatorSize.KeyFramesList = a_aSizesToInterpolate;
 }