public void DoneClick(object sender, System.EventArgs e) { LegendaryActions action = new LegendaryActions(this.NameInput.Text, this.InfoInput.Text, int.Parse(this.CostInput.Text)); AllActions.AddLegendary(action); AllActions.LegendPoints = int.Parse(this.AmountInput.Text); this.Close(); }
public void DoneClick(object sender, System.EventArgs e) { LegendaryActions action = new LegendaryActions(this.NameInput.Text,this.InfoInput.Text, int.Parse(this.CostInput.Text)); AllActions.AddLegendary(action); AllActions.LegendPoints = int.Parse(this.AmountInput.Text); this.Close(); }
public void AddLegendary(LegendaryActions input) { if (this.Legend == null) { this.Legend = new LegendaryActions[1] { input }; } else { LegendaryActions[] temp = new LegendaryActions[this.Legend.Length + 1]; for (int x = 0; x < this.Attacks.Length; x++) { temp[x] = this.Legend[x]; } temp[this.Legend.Length] = input; this.Legend = temp; } }
public void AddLegendary(LegendaryActions input) { if (this.Legend==null) { this.Legend = new LegendaryActions[1] { input }; } else { LegendaryActions[] temp = new LegendaryActions[this.Legend.Length + 1]; for (int x = 0; x < this.Attacks.Length; x++) { temp[x] = this.Legend[x]; } temp[this.Legend.Length] = input; this.Legend = temp; } }