Esempio n. 1
0
    void Awake()
    {
        obs = GetComponent <IPlottable>();
        availiableVariables = new string[obs.Data().Count];
        int i = 0;

        foreach (KeyValuePair <string, float> kvp in obs.Data())
        {
            availiableVariables[i] = kvp.Key;
            i++;
        }
    }
Esempio n. 2
0
 public float GetData(string key)
 {
     foreach (KeyValuePair <string, float> kvp in obs.Data())
     {
         if (kvp.Key == key)
         {
             return(kvp.Value);
         }
     }
     Debug.LogError("There is no data for key " + key);
     return(0);
 }