Esempio n. 1
0
 protected virtual void OnConfigReady(StdConfig conf)
 {
     if (ConfigReady != null)
     {
         ConfigReady(this, conf);
     }
 }
Esempio n. 2
0
        //use configPath to interpret config file and fill out a StdConfig object,
        //pass StdConfig in event to listeners
        public void ReadConfigFile()
        {
            TextAsset configData = (TextAsset)Resources.Load("config");
            string    fileData   = configData.text;

            string[]  lines = fileData.Split('\n');
            string[]  data;
            StdConfig test = new StdConfig();

            foreach (string line in lines)
            {
                data = (line.Trim()).Split(',');
                test.AddParameter(data[0], data[1]);
            }
            OnConfigReady(test);
        }
Esempio n. 3
0
 public void OnConfigReady(object source, StdConfig conf)
 {
     Debug.Log("heard configready event!");
 }