public override bool Check()
 {
     if (_param == BTPrecondition2Param.And)
     {
         return(_precondition1.Check() && _precondition2.Check());
     }
     else
     {
         return(_precondition1.Check() || _precondition2.Check());
     }
 }
示例#2
0
        public bool Evaluate()
        {
            bool coolDownOK = CheckTimer();

            return(activated && coolDownOK && (precondition == null || precondition.Check()) && DoEvaluate());
        }