Exemple #1
0
        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");
            }
        }
Exemple #2
0
            public int GetWeight(Agent pAgent)
            {
                DecoratorWeight decoratorWeight = (DecoratorWeight)base.GetNode();

                return((decoratorWeight == null) ? 0 : decoratorWeight.GetWeight(pAgent));
            }
Exemple #3
0
            public int GetWeight(Agent pAgent)
            {
                DecoratorWeight node = (DecoratorWeight)base.GetNode();

                return((node == null) ? 0 : node.GetWeight(pAgent));
            }