Example #1
0
        public List <AIOption> GetOptions()
        {
            List <AIOption> options = new List <AIOption>();
            //TODO-fred revoir pour une recherche sur plusieurs CollectionEntryNodes
            CollectionEntryNode collectionEntryNodes = GetInputPort("Collection").GetInputValue <CollectionEntryNode>();
            List <ActionNode>   actionNodes          = GetInputPort("Actions").GetInputValues <ActionNode>().ToList();

            if (collectionEntryNodes != null)
            {
                while (collectionEntryNodes.CollectionCount > collectionEntryNodes.Index)
                {
                    options.Add(new AIOption(actionNodes, GetUtility(), Description));
                    collectionEntryNodes.Index++;
                }
                collectionEntryNodes.Index = 0;
            }
            else
            {
                options.Add(new AIOption(actionNodes, GetUtility(), Description));
            }
            return(options);
        }
Example #2
0
        public List <AIOption> GetOptions()
        {
            List <AIOption> options = new List <AIOption>();
            //TODO-fred switch to multiple CollectionEntryNodes
            CollectionEntryNode collectionEntryNodes = GetInputPort("Collection").GetInputValue <CollectionEntryNode>();
            List <ActionNode>   actionNodes          = GetInputPort("Actions").GetInputValues <ActionNode>().ToList();

            if (collectionEntryNodes != null)
            {
                while (collectionEntryNodes.CollectionCount > collectionEntryNodes.Index)
                {
                    options.Add(new AIOption(actionNodes, GetUtilityAndWeight(), Description));
                    collectionEntryNodes.Index++;
                }
                collectionEntryNodes.Index = 0;
            }
            else
            {
                options.Add(new AIOption(actionNodes, GetUtilityAndWeight(), Description));
            }
            return(options);
        }