/// <summary> /// Deep copy the ParticleToCopy's values into this Particle /// </summary> /// <param name="ParticleToCopy">The Particle whose values should be Copied</param> public override void CopyFrom(DPSFParticle ParticleToCopy) { // Cast the Particle from its base type to its actual type EngineSpriteParticle cParticleToCopy = (EngineSpriteParticle)ParticleToCopy; base.CopyFrom(cParticleToCopy); //----------------------------------------------------------- // TODO: Copy your Particle properties from the given Particle here //----------------------------------------------------------- particleType = cParticleToCopy.particleType; }
//=========================================================== // Particle Update Functions //=========================================================== //----------------------------------------------------------- // TODO: Place your Particle Update functions here, using the // same function prototype as below (i.e. public void FunctionName(DPSFParticle, float)) //----------------------------------------------------------- /// <summary> /// Example of how to create a Particle Event Function /// </summary> /// <param name="cParticle">The Particle to update</param> /// <param name="fElapsedTimeInSeconds">How long it has been since the last update</param> protected void UpdateParticleFunctionExample(EngineSpriteParticle cParticle, float fElapsedTimeInSeconds) { // Place code to update the Particle here // Example: cParticle.Position += cParticle.Velocity * fElapsedTimeInSeconds; }