public void Disappear() { Effects.Disappear disappearEffect = new Effects.Disappear (500); disappearEffect.OnComplete = HandleDisappearEffectOnComplete; StartEffect (disappearEffect); }
public Particle(Texture2D particleTexture, Vector2 position, Constants.ViewLayer layer, Vector2 velocity, Vector2 acceleration, double lifeSpan, bool shouldShrink) : base(particleTexture, position, layer) { //CenterOrigin (); Velocity = velocity; Acceleration = acceleration; //StartEffect (new Effects.Motion (velocity, acceleration, lifeSpan)); DisappearEffect = new Effects.Disappear (lifeSpan); DisappearEffect.OnComplete = HandleDisappear; StartEffect (DisappearEffect); ScaleEffect = new Effects.Scale (1f, 0f, lifeSpan); if (shouldShrink) { StartEffect (ScaleEffect); } }