Exemplo n.º 1
0
 public object GetValue(StratusBlackboard blackboard, GameObject gameObject)
 {
     if (scope == Scope.Local)
     {
         return(blackboard.GetLocal(gameObject, key));
     }
     return(blackboard.GetGlobal(key));
 }
Exemplo n.º 2
0
            /// <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);
            }