private void addEffectToolStripMenuItem_Click(object sender, EventArgs e) { PickEffectSimple box = new PickEffectSimple(); if (box.ShowDialog() == DialogResult.OK) { string result = box.Effect; CurrentAbility.Effects.Add(EffectHelper.CreateEmpty(result)); ReloadEffectList(); } }
public ITimedEffect ReadEffect() { ITimedEffect result = EffectHelper.CreateEmpty(reader.ReadString()); result.BaseTime = reader.ReadSingle(); result.DeltaTime = reader.ReadSingle(); result.BaseDuration = reader.ReadSingle(); result.DeltaDuration = reader.ReadSingle(); int paramcount = reader.ReadInt32(); string[] eparams = new string[paramcount]; for (int i = 0; i < paramcount; i++) { eparams[i] = reader.ReadString(); } result.SetParamValues(eparams); return(result); }