Пример #1
0
        public override void Activate(Database database)
        {
            base.Activate(database);

            _precondition1.Activate(database);
            _precondition2.Activate(database);
        }
Пример #2
0
        // To use with BTNode's constructor to provide initialization delay
        // public virtual void Init () {}

        public virtual void Activate(Database database)
        {
            if (activated)
            {
                return;
            }

            this.database = database;
            //			Init();

            if (precondition != null)
            {
                precondition.Activate(database);
            }
            if (_children != null)
            {
                foreach (BTNode child in _children)
                {
                    child.Activate(database);
                }
            }

            activated = true;
        }