Prolog.KnowledgeBase.Consult C# (CSharp) Method

Consult() public method

Load assertions into the KB
public Consult ( Stream stream ) : void
stream Stream
return void
        public void Consult(Stream stream)
        {
            Consult(new StreamReader(stream));
        }

Same methods

KnowledgeBase::Consult ( TextReader inStream ) : void
KnowledgeBase::Consult ( string path ) : void

Usage Example

Ejemplo n.º 1
0
        private void MakeKB()
        {
            var parent   = transform.parent;
            KB  parentKB = null;

            if (parent != null)
            {
                parentKB = parent.GetComponent <KB>();
            }

            kb = IsGlobal?
                 KnowledgeBase.Global
                : new KnowledgeBase(
                gameObject.name,
                gameObject,
                parentKB == null ? GameObject.Find(GlobalKBGameObjectName).KnowledgeBase() : parentKB.KnowledgeBase);

            // Add UID counter.
            ELNode.Store(kb.ELRoot / Symbol.Intern("next_uid") % 0);

            try
            {
                foreach (var file in SourceFiles)
                {
                    kb.Consult(file);
                }
            }
            catch (Exception)
            {
                Debug.Break(); // Pause the game
                throw;
            }
        }
All Usage Examples Of Prolog.KnowledgeBase::Consult