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