示例#1
0
        /// <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;
        }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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);
 }