private void DestroyEffect() { if (this.mVisualEffect != null) { this.mVisualEffect.Dispose(); this.mVisualEffect = null; this.mDrawColor = kYellowColor; this.startEffectBtn.Enabled = true; this.stopEffectBtn.Enabled = false; } }
private void CreateEffect() { this.mEffectName = this.effectNameTxt.Text; if (this.mVisualEffect == null && !string.IsNullOrEmpty(this.mEffectName)) { this.mVisualEffect = new ScriptCore.VisualEffect(this.mEffectName); if (this.mVisualEffect.ObjectId == Sims3.SimIFace.ObjectGuid.InvalidObjectGuid) { //this.mVisualEffect.Dispose(); this.mVisualEffect = null; this.mDrawColor = kRedColor; } else { this.Scene.AddObject(this.mVisualEffect.ObjectId.Value); this.mVisualEffect.Start(this.mEffectTransition, true); this.mDrawColor = kGreenColor; this.startEffectBtn.Enabled = false; this.stopEffectBtn.Enabled = true; } } }