コード例 #1
0
ファイル: LoaderHandler.cs プロジェクト: Arcanils/AI_Utility
 public void FillCollections(ref IActionCollection actionCollection, ref IConsiderationCollection considerationCollection)
 {
     foreach (var keyvalue in m_loaders)
     {
         var key         = keyvalue.Key;
         var loader      = keyvalue.Value;
         var dicoActions = loader.Actions;
         foreach (var keyvalueAction in dicoActions)
         {
             var keyAction = keyvalueAction.Key;
             var deleg     = keyvalueAction.Value;
             var id        = new InfoId()
             {
                 NamespaceId = key, NameId = keyAction
             };
             var newAction = new DynamicAction(id, deleg);
             //actionCollection.Add(newAction);
         }
         var dicoConsiderations = loader.Considerations;
         foreach (var keyvalueConsideration in dicoConsiderations)
         {
             var keyConsideration = keyvalueConsideration.Key;
             var deleg            = keyvalueConsideration.Value;
             var id = new InfoId()
             {
                 NamespaceId = key, NameId = keyConsideration
             };
             var newConsideration = new DynamicConsideration(id, deleg);
             //considerationCollection.Add(newConsideration);
         }
     }
 }
コード例 #2
0
ファイル: Consideration.cs プロジェクト: Arcanils/AI_Utility
        public DynamicConsideration(InfoId id, ConsiderationToGet callback)
        {
            m_utility = new Utility(0f, 1f);

            m_id       = id;
            m_callback = callback;
        }
コード例 #3
0
ファイル: LoaderHandler.cs プロジェクト: Arcanils/AI_Utility
        public IConsideration GetConsideration(string nameContext, string nameConsideration)
        {
            var deleg = m_loaders[nameContext].Considerations[nameConsideration];
            var id    = new InfoId()
            {
                NamespaceId = nameContext, NameId = nameConsideration
            };

            return(new DynamicConsideration(id, deleg));
        }
コード例 #4
0
ファイル: DynamicAction.cs プロジェクト: Arcanils/AI_Utility
 public DynamicAction(DynamicAction actionToCopy)
 {
     this.m_refActionToExecute = actionToCopy.m_refActionToExecute;
     this.m_info = actionToCopy.m_info;
     this.m_id   = actionToCopy.m_id;
 }
コード例 #5
0
ファイル: DynamicAction.cs プロジェクト: Arcanils/AI_Utility
 public DynamicAction(InfoId id, ActionToExecute action)
 {
     m_id = id;
     m_refActionToExecute = action;
 }