/// <summary>
        /// Call this before doing anything else
        /// </summary>
        /// <param name="file"></param>
        /// <param name="key"></param>
        /// <param name="pathPrefix"></param>
        /// <param name="pathSuffix"></param>
        public void Initialize(string masterUniqueId, string key, string pathPrefix, string pathSuffix)
        {
            Key        = key;
            PathPrefix = pathPrefix;
            PathSuffix = pathSuffix;

            Master = J2SGlobal.GetMasterByFile(masterUniqueId);
            if (Master != null)
            {
                Master.AddChild(this);
            }
            else
            {
                Debug.Console(1, "JSON Child [{0}] cannot link to master {1}", key, masterUniqueId);
            }
        }
Exemple #2
0
 /// <summary>
 /// Sets up class - overriding methods should always call this.
 /// </summary>
 /// <param name="uniqueId"></param>
 public virtual void Initialize(string uniqueId)
 {
     UniqueID = uniqueId;
     J2SGlobal.AddMaster(this);             // Should not re-add
 }