Exemplo n.º 1
0
 protected virtual void OnConfigReady(StdConfig conf)
 {
     if (ConfigReady != null)
     {
         ConfigReady(this, conf);
     }
 }
Exemplo 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);
        }
Exemplo n.º 3
0
 public void OnConfigReady(object source, StdConfig conf)
 {
     Debug.Log("heard configready event!");
 }