private void setSpells() { List <String> spells = new List <string>(); List <int> durations = new List <int>(); List <int> voltages = new List <int>(); if (!String.IsNullOrEmpty(spellBox1.Text)) { spells.Add(spellBox1.Text.Replace(" ", "")); durations.Add(int.Parse(duration1.Text)); voltages.Add(int.Parse(voltage1.Text)); } if (!String.IsNullOrEmpty(spellBox2.Text)) { spells.Add(spellBox2.Text.Replace(" ", "")); durations.Add(int.Parse(duration2.Text)); voltages.Add(int.Parse(voltage3.Text)); } if (!String.IsNullOrEmpty(spellBox3.Text)) { spells.Add(spellBox3.Text.Replace(" ", "")); durations.Add(int.Parse(duration3.Text)); voltages.Add(int.Parse(voltage3.Text)); } wandTracker.setSpells(spells, durations, voltages); }
public WandHandler(PictureBox pbStrokes, List<string> spellNames, Action spellFunction) { this.pbStrokes = pbStrokes; spellAction = spellFunction; strokesGraphics = Graphics.FromImage(strokesBitmap); wandTracker = new WandTracker(); wandTracker.setSpells(spellNames, null, null, null); }
public WandHandler(PictureBox pbStrokes, List <String> spellNames, Action spellFunction) { this.pbStrokes = pbStrokes; this.spellAction = spellFunction; strokesGraphics = Graphics.FromImage(strokesBitmap); wandTracker = new WandTracker(); wandTracker.setSpells(spellNames, null, null, null); }