Example #1
0
        public Particle(MirLibrary lib, int textureIndex, float opacity, Vector2 position, Vector2 velocity,
                        float angle, float angularVelocity, Color color, float scale, float scaleRate, TimeSpan ttl, bool fade, float fadeRate, float maxScale = -1f)
        {
            Library         = lib;
            TextureIndex    = textureIndex;
            Position        = position;
            Velocity        = velocity;
            Angle           = angle;
            AngularVelocity = angularVelocity;
            Color           = color;
            Scale           = scale;
            ScaleRate       = scaleRate;
            MaxScale        = maxScale;
            TTL             = ttl;
            UpdateSpeed     = TimeSpan.FromMilliseconds(10);

            Opacity  = opacity;
            Fade     = fade;
            FadeRate = fadeRate;

            Expires    = CEnvir.Now.Add(TTL);
            NextUpdate = CEnvir.Now.Add(UpdateSpeed);
        }