Exemple #1
0
        /// <summary>
        /// Initialises this <see cref="ParticleSystem"/> instance.
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="blendMode">The blend mode.</param>
        public void Initialise(ParticleSystemDescription description)
        {
            this.Description = description;

            material.Parameters["Texture"].SetValue(description.Texture);
            material.Parameters["Lifetime"].SetValue(description.Lifetime);
            material.Parameters["EndVelocity"].SetValue(description.EndLinearVelocity);
            material.Parameters["EndScale"].SetValue(description.EndScale);
            material.Parameters["Gravity"].SetValue(description.Gravity);

            currentTimeParameter   = material.Parameters["Time"];
            viewportScaleParameter = material.Parameters["ViewportScale"];

            InitialiseBuffer();
        }
        /// <summary>
        /// Initialises this <see cref="ParticleSystem"/> instance.
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="blendMode">The blend mode.</param>
        public void Initialise(ParticleSystemDescription description)
        {
            this.Description = description;

            material.Parameters["Texture"].SetValue(description.Texture);
            material.Parameters["Lifetime"].SetValue(description.Lifetime);
            material.Parameters["EndVelocity"].SetValue(description.EndLinearVelocity);
            material.Parameters["EndScale"].SetValue(description.EndScale);
            material.Parameters["Gravity"].SetValue(description.Gravity);

            currentTimeParameter = material.Parameters["Time"];
            viewportScaleParameter = material.Parameters["ViewportScale"];

            InitialiseBuffer();
        }