public override void AddChild(BehaviorNode pBehavior) { Debug.Check(pBehavior is DecoratorWeight); DecoratorWeight pDW = (DecoratorWeight)(pBehavior); if (pDW != null) { base.AddChild(pBehavior); } else { Debug.Check(false, "only DecoratorWeightTask can be children"); } }
public int GetWeight(Agent pAgent) { DecoratorWeight decoratorWeight = (DecoratorWeight)base.GetNode(); return((decoratorWeight == null) ? 0 : decoratorWeight.GetWeight(pAgent)); }
public int GetWeight(Agent pAgent) { DecoratorWeight node = (DecoratorWeight)base.GetNode(); return((node == null) ? 0 : node.GetWeight(pAgent)); }