コード例 #1
0
        private List <ISpellswordCommand> GenerateCommands()
        {
            List <ISpellswordCommand> commands = new List <ISpellswordCommand>();

            foreach (Talent talent in player.AvailableTalents)
            {
                AddTalentCommand newCommand = new AddTalentCommand(player, talent);
                commands.Add(newCommand);
            }
            return(commands);
        }
コード例 #2
0
        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);
        }