private List <ISpellswordCommand> UpdateCommands() { ISpellswordCommand backCommand = currentCommands.Last(); List <ISpellswordCommand> commands = new List <ISpellswordCommand>(); foreach (Talent talent in player.AvailableTalents) { AddTalentCommand newCommand = new AddTalentCommand(player, talent); commands.Add(newCommand); } commands.Add(backCommand); return(commands); }
private List <ISpellswordCommand> UpdateCommands() { ISpellswordCommand backCommand = currentCommands.Last(); List <ISpellswordCommand> spellList = new List <ISpellswordCommand>(); foreach (Attack attack in player.SpellList) { attack.UpdateDescription(); EmptyCommand command = new EmptyCommand(attack.Name, attack.Description); spellList.Add(command); } spellList.Add(backCommand); return(spellList); //for (int i = 0; i < currentCommands.Count - 1; i++) //{ // player.SpellList[i].UpdateDescription(); // currentCommands[i] = new EmptyCommand(player.SpellList[i].Name, player.SpellList[i].Description); //} }
public void RemoveCommand(ISpellswordCommand command) { currentCommands.Remove(command); }
public void AddCommand(ISpellswordCommand command) { currentCommands.Add(command); }