コード例 #1
0
 ///Get the variable value of name
 public T GetValue <T>(string name)
 {
     if (_blackboard.variables.ContainsKey(name))
     {
         return(_blackboard.GetValue <T>(name));
     }
     else if (Parent.variables.ContainsKey(name))
     {
         return(Parent.GetValue <T>(name));
     }
     return(default(T));
 }
コード例 #2
0
        void BBMethodsSpoof()
        {
            var bb = new BlackboardSource();

            bb.GetVariable <System.Boolean>("");
            bb.GetValue <System.Boolean>("");
            bb.GetVariable <System.Single>("");
            bb.GetValue <System.Single>("");
            bb.GetVariable <System.Int32>("");
            bb.GetValue <System.Int32>("");
            bb.GetVariable <UnityEngine.Vector2>("");
            bb.GetValue <UnityEngine.Vector2>("");
            bb.GetVariable <UnityEngine.Vector3>("");
            bb.GetValue <UnityEngine.Vector3>("");
            bb.GetVariable <UnityEngine.Vector4>("");
            bb.GetValue <UnityEngine.Vector4>("");
            bb.GetVariable <UnityEngine.Quaternion>("");
            bb.GetValue <UnityEngine.Quaternion>("");
            bb.GetVariable <UnityEngine.Keyframe>("");
            bb.GetValue <UnityEngine.Keyframe>("");
            bb.GetVariable <UnityEngine.Bounds>("");
            bb.GetValue <UnityEngine.Bounds>("");
            bb.GetVariable <UnityEngine.Color>("");
            bb.GetValue <UnityEngine.Color>("");
            bb.GetVariable <UnityEngine.Rect>("");
            bb.GetValue <UnityEngine.Rect>("");
        }
コード例 #3
0
 ///Get the variable value of name
 public T GetValue <T>(string name)
 {
     return(_blackboard.GetValue <T>(name));
 }