/// <summary> /// Add a new Comp as a child of this one. /// </summary> /// <param name="child">The child Comp to add.</param> public void AddChild(Comp child) { if (Children == null) Children = new List<Comp>(); if (!Children.Contains(child)) { Children.Add(child); } child._parent = this; }
/// <summary>To let an AI (BT node) indicate a required Comp to enable in this Entity</summary> /// <param name="comp">The component that should be enabled, as a result of a BTAI decision</param> public void EnableComp(Comp comp) { CompsToEnable.Add(comp); }
/// <summary>To let an AI (BT node) indicate a non-required Comp for this Entity</summary> /// <param name="comp">The component that should be disabled, as a result of a BTAI decision, BUT ONLY /// if there are no other AI states active that would require this Component.</param> public void DisableComp(Comp comp) { CompsToDisable.Add(comp); }