// only relevant method for conditions. Perform a check and return the result public override bool Check() { ANITAs_BLACKBOARD blackboard = gameObject.GetComponent <ANITAs_BLACKBOARD>(); if (blackboard == null) { Debug.Log("No blackboard attached in CheckExistences. Failing"); return(false); } else { if (checkStorage) { return(blackboard.CheckStorage(item)); } else { return(blackboard.CheckExistences(item)); } } }
public bool checkExistances; // para evitar el bug del sistema solo tendremos una funcion public override bool Check() { ANITAs_BLACKBOARD _blackBoard = this.gameObject.GetComponent <ANITAs_BLACKBOARD>(); if (ReferenceEquals(_blackBoard, null)) { Debug.LogError("No blackboardFound"); return(false); } else { if (checkExistances) { return(_blackBoard.CheckExistences(item)); } else { return(_blackBoard.CheckStorage(item)); } } //throw new System.NotImplementedException(); }