//

            public Enumerator(ReferenceList <T> list)
            {
                this.list = list;
                index     = 0;
                //version = list.version;
                this.current = default(T);
            }
        /////////////////////////////////////////

        //static CurveCubicSpline1F CreateCurve( List<CurvePoint> curve )
        //{
        //	if( curve != null && curve.Count != 0 )
        //	{
        //		var result = new CurveCubicSpline1F();
        //		foreach( var point in curve )
        //		{
        //			if( result.GetPointIndexByTime( point.Point ) == -1 )
        //				result.AddPoint( point.Point, point.Value );
        //		}
        //		return result;
        //	}
        //	else
        //		return null;
        //}

        static CurveCubicSpline1F CreateCurve(ReferenceList <CurvePoint> curve)
        {
            if (curve != null && curve.Count != 0)
            {
                var result = new CurveCubicSpline1F();
                foreach (var point in curve)
                {
                    if (result.GetPointIndexByTime(point.Value.Point) == -1)
                    {
                        result.AddPoint(point.Value.Point, point.Value.Value);
                    }
                }
                return(result);
            }
            else
            {
                return(null);
            }
        }
Exemple #3
0
        /////////////////////////////////////////

        public Component_Sensor()
        {
            _objects = new ReferenceList <Component_ObjectInSpace>(this, () => ObjectsChanged?.Invoke(this));
        }
Exemple #4
0
        /////////////////////////////////////////

        public Component_ParticleColorMultiplierByTime()
        {
            _curve = new ReferenceList <Component_ParticleSystem.CurvePoint>(this, delegate() { CurveChanged?.Invoke(this); ShouldRecompileParticleSystem(); });
        }
        /////////////////////////////////////////

        public Component_ParticleAccelerationByTime()
        {
            _curveX = new ReferenceList <Component_ParticleSystem.CurvePoint>(this, delegate() { CurveXChanged?.Invoke(this); ShouldRecompileParticleSystem(); });
            _curveY = new ReferenceList <Component_ParticleSystem.CurvePoint>(this, delegate() { CurveYChanged?.Invoke(this); ShouldRecompileParticleSystem(); });
            _curveZ = new ReferenceList <Component_ParticleSystem.CurvePoint>(this, delegate() { CurveZChanged?.Invoke(this); ShouldRecompileParticleSystem(); });
        }