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; } }
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; } }
private Playset(string path) { KnowledgeBase = new KnowledgeBase(Path.GetFileNameWithoutExtension(path), null); KnowledgeBase.Consult(Path.Combine(Application.dataPath, "Solver.prolog")); KnowledgeBase.Consult(path); }