public object GetValue(StratusBlackboard blackboard, GameObject gameObject) { if (scope == Scope.Local) { return(blackboard.GetLocal(gameObject, key)); } return(blackboard.GetGlobal(key)); }
/// <summary> /// Gets the value of the symbol with the selected key /// </summary> /// <param name="owner"></param> /// <param name="value"></param> public object Get(GameObject owner) { if (blackboard == null) { throw new NullReferenceException($"No blackboard has been set!"); } object value = null; switch (scope) { case Scope.Local: value = blackboard.GetLocal(owner, key); break; case Scope.Global: value = blackboard.GetGlobal(key); break; } return(value); }